Changeset 83941 in webkit
- Timestamp:
- Apr 14, 2011 8:52:23 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r83940 r83941 1 2011-04-14 Alok Priyadarshi <alokp@chromium.org> 2 3 Reviewed by James Robinson. 4 5 Remove dependency on chromium skia::PlatformCanvas 6 https://bugs.webkit.org/show_bug.cgi?id=57563 7 8 This patch does not change any functionality, just the type of object skia::PlatformCanvas -> SkCanvas. The object is still being created by a factory method skia::CreateBitmapCanvas defined in Chromium. We will eventually define an API that every port using skia will define. 9 10 * platform/graphics/chromium/FontChromiumWin.cpp: 11 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): 12 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): 13 (WebCore::Font::drawComplexText): 14 * platform/graphics/chromium/ImageBufferDataSkia.h: 15 * platform/graphics/chromium/LayerChromium.h: 16 * platform/graphics/chromium/LayerRendererChromium.h: 17 * platform/graphics/chromium/PlatformCanvas.cpp: 18 (WebCore::PlatformCanvas::resize): 19 * platform/graphics/chromium/PlatformCanvas.h: 20 * platform/graphics/chromium/TransparencyWin.cpp: 21 (WebCore::TransparencyWin::compositeTextComposite): 22 (WebCore::TransparencyWin::makeLayerOpaque): 23 * platform/graphics/skia/ImageBufferSkia.cpp: 24 (WebCore::ImageBuffer::ImageBuffer): 25 * platform/graphics/skia/ImageSkia.cpp: 26 (WebCore::paintSkBitmap): 27 (WebCore::Image::drawPattern): 28 * platform/graphics/skia/PlatformContextSkia.cpp: 29 (WebCore::PlatformContextSkia::PlatformContextSkia): 30 (WebCore::PlatformContextSkia::setCanvas): 31 (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): 32 * platform/graphics/skia/PlatformContextSkia.h: 33 (WebCore::PlatformContextSkia::canvas): 34 (WebCore::PlatformContextSkia::printing): 35 (WebCore::PlatformContextSkia::setPrinting): 36 1 37 2011-04-14 Eric Seidel <eric@webkit.org> 2 38 -
trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
r83666 r83941 166 166 // Set up the DC, using the one from the transparency helper. 167 167 if (m_transparency.platformContext()) { 168 m_hdc = m_transparency.platformContext()->canvas()->beginPlatformPaint();168 m_hdc = skia::BeginPlatformPaint(m_transparency.platformContext()->canvas()); 169 169 SetTextColor(m_hdc, skia::SkColorToCOLORREF(color)); 170 170 SetBkMode(m_hdc, TRANSPARENT); … … 180 180 m_graphicsContext->endTransparencyLayer(); 181 181 m_graphicsContext->restore(); 182 m_platformContext->canvas()->endPlatformPaint();182 skia::EndPlatformPaint(m_platformContext->canvas()); 183 183 } 184 184 … … 543 543 state.draw(graphicsContext, hdc, lroundf(point.x()), lroundf(point.y() - fontMetrics().ascent()), from, to); 544 544 545 context->canvas()->endPlatformPaint();545 skia::EndPlatformPaint(context->canvas()); 546 546 } 547 547 -
trunk/Source/WebCore/platform/graphics/chromium/ImageBufferDataSkia.h
r83786 r83941 39 39 ImageBufferData(const IntSize&); 40 40 41 skia::PlatformCanvasm_canvas;41 OwnPtr<SkCanvas> m_canvas; 42 42 PlatformContextSkia m_platformContext; 43 43 }; -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r83915 r83941 51 51 #include <wtf/text/WTFString.h> 52 52 53 54 namespace skia {55 class PlatformCanvas;56 }57 58 53 namespace WebCore { 59 54 -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
r83915 r83941 188 188 189 189 #if USE(SKIA) 190 OwnPtr< skia::PlatformCanvas> m_rootLayerCanvas;190 OwnPtr<SkCanvas> m_rootLayerCanvas; 191 191 OwnPtr<PlatformContextSkia> m_rootLayerSkiaContext; 192 192 OwnPtr<GraphicsContext> m_rootLayerGraphicsContext; -
trunk/Source/WebCore/platform/graphics/chromium/PlatformCanvas.cpp
r83915 r83941 53 53 m_size = size; 54 54 #if USE(SKIA) 55 m_skiaCanvas = new skia::PlatformCanvas(size.width(), size.height(), false);55 m_skiaCanvas = skia::CreateBitmapCanvas(size.width(), size.height(), false); 56 56 #elif PLATFORM(CG) 57 57 size_t bufferSize = size.width() * size.height() * 4; -
trunk/Source/WebCore/platform/graphics/chromium/PlatformCanvas.h
r83915 r83941 40 40 41 41 #if USE(SKIA) 42 namespace skia { class PlatformCanvas; }43 42 class SkBitmap; 43 class SkCanvas; 44 44 #endif 45 45 … … 100 100 private: 101 101 #if USE(SKIA) 102 OwnPtr< skia::PlatformCanvas> m_skiaCanvas;102 OwnPtr<SkCanvas> m_skiaCanvas; 103 103 #elif PLATFORM(CG) 104 104 OwnArrayPtr<uint8_t> m_pixelData; -
trunk/Source/WebCore/platform/graphics/chromium/TransparencyWin.cpp
r83666 r83941 50 50 const int maxCachedBufferPixelSize = 65536; 51 51 52 inline skia::PlatformCanvas* canvasForContext(const GraphicsContext& context)52 inline SkCanvas* canvasForContext(const GraphicsContext& context) 53 53 { 54 54 return context.platformContext()->canvas(); … … 57 57 inline const SkBitmap& bitmapForContext(const GraphicsContext& context) 58 58 { 59 return canvasForContext(context)->getTop PlatformDevice().accessBitmap(false);59 return canvasForContext(context)->getTopDevice()->accessBitmap(false); 60 60 } 61 61 … … 467 467 return; 468 468 469 const SkBitmap& bitmap = m_layerBuffer->context()->platformContext()->canvas()->getTop PlatformDevice().accessBitmap(true);469 const SkBitmap& bitmap = m_layerBuffer->context()->platformContext()->canvas()->getTopDevice()->accessBitmap(true); 470 470 SkColor textColor = m_textCompositeColor.rgb(); 471 471 for (int y = 0; y < m_layerSize.height(); y++) { … … 503 503 504 504 SkBitmap& bitmap = const_cast<SkBitmap&>(m_drawContext->platformContext()-> 505 canvas()->getTop PlatformDevice().accessBitmap(true));505 canvas()->getTopDevice()->accessBitmap(true)); 506 506 for (int y = 0; y < m_layerSize.height(); y++) { 507 507 uint32_t* row = bitmap.getAddr32(0, y); -
trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
r83790 r83941 67 67 , m_size(size) 68 68 { 69 if (!m_data.m_canvas.initialize(size.width(), size.height(), false)) { 69 SkCanvas* canvas = skia::CreateBitmapCanvas(size.width(), size.height(), false); 70 if (!canvas) { 70 71 success = false; 71 72 return; 72 73 } 73 74 74 m_data.m_platformContext.setCanvas(&m_data.m_canvas); 75 m_data.m_canvas = canvas; 76 m_data.m_platformContext.setCanvas(m_data.m_canvas.get()); 75 77 m_context.set(new GraphicsContext(&m_data.m_platformContext)); 76 78 m_context->platformContext()->setDrawingToImageBuffer(true); … … 79 81 // required, but the canvas is currently filled with the magic transparency 80 82 // color. Can we have another way to manage this? 81 m_data.m_canvas .drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);83 m_data.m_canvas->drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode); 82 84 success = true; 83 85 } -
trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp
r83666 r83941 263 263 paint.setLooper(platformContext->getDrawLooper()); 264 264 265 skia::PlatformCanvas* canvas = platformContext->canvas(); 266 267 ResamplingMode resampling = platformContext->isPrinting() ? RESAMPLE_NONE : 265 SkCanvas* canvas = platformContext->canvas(); 266 267 ResamplingMode resampling; 268 #if ENABLE(SKIA_GPU) 269 resampling = RESAMPLE_LINEAR; 270 #else 271 resampling = platformContext->printing() ? RESAMPLE_NONE : 268 272 computeResamplingMode(platformContext, bitmap, srcRect.width(), srcRect.height(), 269 273 SkScalarToFloat(destRect.width()), 270 274 SkScalarToFloat(destRect.height())); 275 #endif 271 276 if (resampling == RESAMPLE_AWESOME) { 272 277 drawResampledBitmap(*canvas, paint, bitmap, srcRect, destRect); … … 364 369 // Compute the resampling mode. 365 370 ResamplingMode resampling; 366 if (context->platformContext()->isPrinting()) 371 #if ENABLE(SKIA_GPU) 372 resampling = RESAMPLE_LINEAR; 373 #else 374 if (context->platformContext()->printing()) 367 375 resampling = RESAMPLE_LINEAR; 368 376 else { … … 371 379 destBitmapWidth, destBitmapHeight); 372 380 } 381 #endif 373 382 374 383 // Load the transform WebKit requested. -
trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
r83733 r83941 214 214 215 215 // Danger: canvas can be NULL. 216 PlatformContextSkia::PlatformContextSkia( skia::PlatformCanvas* canvas)216 PlatformContextSkia::PlatformContextSkia(SkCanvas* canvas) 217 217 : m_canvas(canvas) 218 , m_printing(false) 218 219 , m_drawingToImageBuffer(false) 219 220 , m_useGPU(false) … … 241 242 } 242 243 243 void PlatformContextSkia::setCanvas( skia::PlatformCanvas* canvas)244 void PlatformContextSkia::setCanvas(SkCanvas* canvas) 244 245 { 245 246 m_canvas = canvas; … … 610 611 } 611 612 612 bool PlatformContextSkia::isPrinting()613 {614 #if ENABLE(SKIA_GPU)615 return true;616 #else617 return m_canvas->getTopPlatformDevice().IsVectorial();618 #endif619 }620 621 613 bool PlatformContextSkia::isNativeFontRenderingAllowed() 622 614 { … … 624 616 return false; 625 617 #else 626 return m_canvas->getTopPlatformDevice().IsNativeFontRenderingAllowed();618 return skia::SupportsPlatformPaint(m_canvas); 627 619 #endif 628 620 } -
trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.h
r83666 r83941 73 73 // For printing, there shouldn't be any canvas. canvas can be NULL. If you 74 74 // supply a NULL canvas, you can also call setCanvas later. 75 PlatformContextSkia( skia::PlatformCanvas*);75 PlatformContextSkia(SkCanvas*); 76 76 ~PlatformContextSkia(); 77 77 78 78 // Sets the canvas associated with this context. Use when supplying NULL 79 79 // to the constructor. 80 void setCanvas( skia::PlatformCanvas*);80 void setCanvas(SkCanvas*); 81 81 82 82 // If false we're rendering to a GraphicsContext for a web page, if false … … 148 148 149 149 // Returns the canvas used for painting, NOT guaranteed to be non-null. 150 skia::PlatformCanvas* canvas() { return m_canvas; }150 SkCanvas* canvas() { return m_canvas; } 151 151 152 152 InterpolationQuality interpolationQuality() const; … … 164 164 // context. Bitmap shouldn't be resampled when printing to keep the best 165 165 // possible quality. 166 bool isPrinting(); 166 bool printing() const { return m_printing; } 167 void setPrinting(bool p) { m_printing = p; } 167 168 168 169 // Returns if the context allows rendering of fonts using native platform … … 186 187 #endif 187 188 // Call these before making a call that manipulates the underlying 188 // skia::PlatformCanvas or WebCore::GLES2Canvas189 // SkCanvas or WebCore::GLES2Canvas 189 190 void prepareForSoftwareDraw() const; 190 191 void prepareForHardwareDraw() const; 191 // Call to force the skia::PlatformCanvas to contain all rendering results.192 // Call to force the SkCanvas to contain all rendering results. 192 193 void syncSoftwareCanvas() const; 193 194 void markDirtyRect(const IntRect& rect); … … 206 207 207 208 // NULL indicates painting is disabled. Never delete this object. 208 skia::PlatformCanvas* m_canvas;209 SkCanvas* m_canvas; 209 210 210 211 // States stack. Enables local drawing state change with save()/restore() … … 219 220 IntSize m_imageResamplingHintSrcSize; 220 221 FloatSize m_imageResamplingHintDstSize; 222 bool m_printing; 221 223 bool m_drawingToImageBuffer; 222 224 bool m_useGPU; -
trunk/Source/WebKit/chromium/ChangeLog
r83935 r83941 1 2011-04-14 Alok Priyadarshi <alokp@chromium.org> 2 3 Reviewed by James Robinson. 4 5 Remove dependency on chromium skia::PlatformCanvas 6 https://bugs.webkit.org/show_bug.cgi?id=57563 7 8 * public/WebCanvas.h: 9 * src/WebFrameImpl.cpp: 10 (WebKit::WebFrameImpl::printPage): 11 * tests/TransparencyWinTest.cpp: 12 (WebCore::drawNativeRect): 13 (WebCore::getPixelAt): 14 (WebCore::clearTopLayerAlphaChannel): 15 (WebCore::clearTopLayerAlphaPixel): 16 (WebCore::TEST): 17 1 18 2011-04-14 Brian Salomon <bsalomon@google.com> 2 19 -
trunk/Source/WebKit/chromium/public/WebCanvas.h
r83666 r83941 35 35 36 36 #if WEBKIT_USING_SKIA 37 namespace skia { class PlatformCanvas; } 37 class SkCanvas; 38 38 #elif WEBKIT_USING_CG 39 39 struct CGContext; … … 43 43 44 44 #if WEBKIT_USING_SKIA 45 typedef skia::PlatformCanvas WebCanvas;45 typedef SkCanvas WebCanvas; 46 46 #elif WEBKIT_USING_CG 47 47 typedef struct CGContext WebCanvas; -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r83666 r83941 1410 1410 } 1411 1411 1412 return m_printContext->spoolPage(GraphicsContextBuilder(canvas).context(), page); 1412 GraphicsContextBuilder builder(canvas); 1413 GraphicsContext& gc = builder.context(); 1414 #if WEBKIT_USING_SKIA 1415 gc.platformContext()->setPrinting(true); 1416 #endif 1417 1418 return m_printContext->spoolPage(gc, page); 1413 1419 } 1414 1420 -
trunk/Source/WebKit/chromium/tests/TransparencyWinTest.cpp
r83666 r83941 51 51 int x, int y, int w, int h) 52 52 { 53 skia::PlatformCanvas* canvas = context->platformContext()->canvas();54 HDC dc = canvas->beginPlatformPaint();53 SkCanvas* canvas = context->platformContext()->canvas(); 54 HDC dc = skia::BeginPlatformPaint(canvas); 55 55 56 56 RECT innerRc; … … 62 62 reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH))); 63 63 64 canvas->endPlatformPaint();64 skia::EndPlatformPaint(canvas); 65 65 } 66 66 67 67 static Color getPixelAt(GraphicsContext* context, int x, int y) 68 68 { 69 const SkBitmap& bitmap = context->platformContext()->canvas()-> 70 getTopPlatformDevice().accessBitmap(false); 69 const SkBitmap& bitmap = context->platformContext()->canvas()->getTopDevice()->accessBitmap(false); 71 70 return Color(*reinterpret_cast<const RGBA32*>(bitmap.getAddr32(x, y))); 72 71 } … … 76 75 static void clearTopLayerAlphaChannel(GraphicsContext* context) 77 76 { 78 SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()-> 79 canvas()->getTopPlatformDevice().accessBitmap(false)); 77 SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()->canvas()->getTopDevice()->accessBitmap(false)); 80 78 for (int y = 0; y < bitmap.height(); y++) { 81 79 uint32_t* row = bitmap.getAddr32(0, y); … … 88 86 static void clearTopLayerAlphaPixel(GraphicsContext* context, int x, int y) 89 87 { 90 SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()-> 91 canvas()->getTopPlatformDevice().accessBitmap(false)); 88 SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()->canvas()->getTopDevice()->accessBitmap(false)); 92 89 *bitmap.getAddr32(x, y) &= 0x00FFFFFF; 93 90 } … … 560 557 // clearTopLayerAlphaChannel because that will actually clear the whole 561 558 // canvas (since we have no extra layer!). 562 SkBitmap& bitmap = const_cast<SkBitmap&>(helper.context()-> 563 platformContext()->canvas()->getTopPlatformDevice(). 564 accessBitmap(false)); 559 SkBitmap& bitmap = const_cast<SkBitmap&>(helper.context()->platformContext()->canvas()->getTopDevice()->accessBitmap(false)); 565 560 *bitmap.getAddr32(2, 2) &= 0x00FFFFFF; 566 561 helper.composite(); -
trunk/Tools/ChangeLog
r83928 r83941 1 2011-04-14 Alok Priyadarshi <alokp@chromium.org> 2 3 Reviewed by James Robinson. 4 5 Remove dependency on chromium skia::PlatformCanvas 6 https://bugs.webkit.org/show_bug.cgi?id=57563 7 8 * DumpRenderTree/chromium/TestShell.cpp: 9 (makeCanvasOpaque): 10 (TestShell::dumpImage): 11 * DumpRenderTree/chromium/TestShell.h: 12 * DumpRenderTree/chromium/WebThemeControlDRTWin.cpp: 13 (WebThemeControlDRTWin::WebThemeControlDRTWin): 14 (WebThemeControlDRTWin::draw): 15 (WebThemeControlDRTWin::drawTextField): 16 (WebThemeControlDRTWin::drawProgressBar): 17 * DumpRenderTree/chromium/WebThemeControlDRTWin.h: 18 * DumpRenderTree/chromium/WebViewHost.cpp: 19 (WebViewHost::canvas): 20 * DumpRenderTree/chromium/WebViewHost.h: 21 1 22 2011-04-14 Keith Kyzivat <keith.kyzivat@nokia.com> 2 23 -
trunk/Tools/DumpRenderTree/chromium/TestShell.cpp
r82481 r83941 51 51 #include "WebView.h" 52 52 #include "WebViewHost.h" 53 #include "skia/ext/bitmap_platform_device.h"54 53 #include "skia/ext/platform_canvas.h" 55 54 #include "webkit/support/webkit_support.h" … … 77 76 static const char dataUrlPattern[] = "data:"; 78 77 static const string::size_type dataUrlPatternSize = sizeof(dataUrlPattern) - 1; 78 79 // FIXME: Move this to a common place so that it can be shared with 80 // WebCore::TransparencyWin::makeLayerOpaque(). 81 static void makeCanvasOpaque(SkCanvas* canvas) 82 { 83 const SkBitmap& bitmap = canvas->getTopDevice()->accessBitmap(true); 84 ASSERT(bitmap.config() == SkBitmap::kARGB_8888_Config); 85 86 SkAutoLockPixels lock(bitmap); 87 for (int y = 0; y < bitmap.height(); y++) { 88 uint32_t* row = bitmap.getAddr32(0, y); 89 for (int x = 0; x < bitmap.width(); x++) 90 row[x] |= 0xFF000000; // Set alpha bits to 1. 91 } 92 } 79 93 80 94 TestShell::TestShell(bool testShellMode) … … 517 531 } 518 532 519 void TestShell::dumpImage(skia::PlatformCanvas* canvas) const 520 { 521 skia::BitmapPlatformDevice& device = 522 static_cast<skia::BitmapPlatformDevice&>(canvas->getTopPlatformDevice()); 523 const SkBitmap& sourceBitmap = device.accessBitmap(false); 524 525 SkAutoLockPixels sourceBitmapLock(sourceBitmap); 526 533 void TestShell::dumpImage(SkCanvas* canvas) const 534 { 527 535 // Fix the alpha. The expected PNGs on Mac have an alpha channel, so we want 528 536 // to keep it. On Windows, the alpha channel is wrong since text/form control … … 534 542 #else 535 543 bool discardTransparency = true; 536 device.makeOpaque(0, 0, sourceBitmap.width(), sourceBitmap.height());544 makeCanvasOpaque(canvas); 537 545 #endif 546 547 const SkBitmap& sourceBitmap = canvas->getTopDevice()->accessBitmap(false); 548 SkAutoLockPixels sourceBitmapLock(sourceBitmap); 538 549 539 550 // Compute MD5 sum. -
trunk/Tools/DumpRenderTree/chromium/TestShell.h
r81603 r83941 55 55 class WebURL; 56 56 } 57 namespace skia {58 class PlatformCanvas;59 }60 57 61 58 class DRTDevToolsAgent; … … 183 180 void dump(); 184 181 std::string dumpAllBackForwardLists(); 185 void dumpImage( skia::PlatformCanvas*) const;182 void dumpImage(SkCanvas*) const; 186 183 187 184 bool m_testIsPending; -
trunk/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp
r74421 r83941 47 47 48 48 using namespace std; 49 using namespace skia;50 49 51 50 static const SkColor edgeColor = SK_ColorBLACK; … … 94 93 // WebThemeControlDRTWin 95 94 96 WebThemeControlDRTWin::WebThemeControlDRTWin( PlatformCanvas* canvas,95 WebThemeControlDRTWin::WebThemeControlDRTWin(SkCanvas* canvas, 97 96 const SkIRect& irect, 98 97 Type ctype, … … 305 304 const int sliderIndent = 2; 306 305 307 m_canvas->beginPlatformPaint();306 skia::BeginPlatformPaint(m_canvas); 308 307 309 308 switch (m_type) { … … 476 475 477 476 markState(); 478 m_canvas->endPlatformPaint();477 skia::EndPlatformPaint(m_canvas); 479 478 } 480 479 … … 486 485 SkPaint paint; 487 486 488 m_canvas->beginPlatformPaint();487 skia::BeginPlatformPaint(m_canvas); 489 488 if (fillContentArea) { 490 489 paint.setColor(color); … … 499 498 500 499 markState(); 501 m_canvas->endPlatformPaint();500 skia::EndPlatformPaint(m_canvas); 502 501 } 503 502 … … 506 505 SkPaint paint; 507 506 508 m_canvas->beginPlatformPaint();507 skia::BeginPlatformPaint(m_canvas); 509 508 paint.setColor(m_bgColor); 510 509 paint.setStyle(SkPaint::kFill_Style); … … 519 518 520 519 markState(); 521 m_canvas->endPlatformPaint();522 } 523 520 skia::EndPlatformPaint(m_canvas); 521 } 522 -
trunk/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h
r76248 r83941 121 121 }; 122 122 123 // canvas is the canvas to draw onto, and rect gives the size of the 124 // control. ctype and cstate specify the type and state of the control. 125 WebThemeControlDRTWin(skia::PlatformCanvas* canvas, 126 const SkIRect& rect, 127 Type ctype, 128 State cstate); 123 // Constructs a control of the given size, type and state to draw 124 // on to the given canvas. 125 WebThemeControlDRTWin(SkCanvas*, const SkIRect&, Type, State); 129 126 ~WebThemeControlDRTWin(); 130 127 … … 185 182 void markState(); 186 183 187 skia::PlatformCanvas* m_canvas;184 SkCanvas* m_canvas; 188 185 const SkIRect m_irect; 189 186 const Type m_type; -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r83632 r83941 67 67 using namespace WebCore; 68 68 using namespace WebKit; 69 using namespace skia;70 69 using namespace std; 71 70 … … 1513 1512 } 1514 1513 1515 PlatformCanvas* WebViewHost::canvas()1514 SkCanvas* WebViewHost::canvas() 1516 1515 { 1517 1516 if (m_canvas) … … 1519 1518 WebSize widgetSize = webWidget()->size(); 1520 1519 resetScrollRect(); 1521 m_canvas.set(new PlatformCanvas(widgetSize.width, widgetSize.height, true)); 1520 m_canvas.set(skia::CreateBitmapCanvas( 1521 widgetSize.width, widgetSize.height, true)); 1522 1522 return m_canvas.get(); 1523 1523 } -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.h
r83632 r83941 46 46 47 47 class LayoutTestController; 48 class SkCanvas; 48 49 class TestShell; 50 49 51 namespace WebKit { 50 52 class WebFrame; … … 61 63 struct WebURLError; 62 64 struct WebWindowFeatures; 63 }64 namespace skia {65 class PlatformCanvas;66 65 } 67 66 … … 88 87 void updatePaintRect(const WebKit::WebRect&); 89 88 void paintInvalidatedRegion(); 90 skia::PlatformCanvas* canvas();89 SkCanvas* canvas(); 91 90 void displayRepaintMask(); 92 91 … … 334 333 335 334 // Painting. 336 OwnPtr< skia::PlatformCanvas> m_canvas;335 OwnPtr<SkCanvas> m_canvas; 337 336 WebKit::WebRect m_paintRect; 338 337 bool m_isPainting;
Note: See TracChangeset
for help on using the changeset viewer.