diff options
Diffstat (limited to 'Source/WebKit/chromium/tests/TransparencyWinTest.cpp')
-rw-r--r-- | Source/WebKit/chromium/tests/TransparencyWinTest.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Source/WebKit/chromium/tests/TransparencyWinTest.cpp b/Source/WebKit/chromium/tests/TransparencyWinTest.cpp index ee3307f..191bf9e 100644 --- a/Source/WebKit/chromium/tests/TransparencyWinTest.cpp +++ b/Source/WebKit/chromium/tests/TransparencyWinTest.cpp @@ -50,8 +50,8 @@ static FloatRect RECTToFloatRect(const RECT* rect) static void drawNativeRect(GraphicsContext* context, int x, int y, int w, int h) { - skia::PlatformCanvas* canvas = context->platformContext()->canvas(); - HDC dc = canvas->beginPlatformPaint(); + SkCanvas* canvas = context->platformContext()->canvas(); + HDC dc = skia::BeginPlatformPaint(canvas); RECT innerRc; innerRc.left = x; @@ -61,13 +61,12 @@ static void drawNativeRect(GraphicsContext* context, FillRect(dc, &innerRc, reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH))); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } static Color getPixelAt(GraphicsContext* context, int x, int y) { - const SkBitmap& bitmap = context->platformContext()->canvas()-> - getTopPlatformDevice().accessBitmap(false); + const SkBitmap& bitmap = context->platformContext()->canvas()->getTopDevice()->accessBitmap(false); return Color(*reinterpret_cast<const RGBA32*>(bitmap.getAddr32(x, y))); } @@ -75,8 +74,7 @@ static Color getPixelAt(GraphicsContext* context, int x, int y) // Windows messing it up. static void clearTopLayerAlphaChannel(GraphicsContext* context) { - SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()-> - canvas()->getTopPlatformDevice().accessBitmap(false)); + SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()->canvas()->getTopDevice()->accessBitmap(false)); for (int y = 0; y < bitmap.height(); y++) { uint32_t* row = bitmap.getAddr32(0, y); for (int x = 0; x < bitmap.width(); x++) @@ -87,8 +85,7 @@ static void clearTopLayerAlphaChannel(GraphicsContext* context) // Clears the alpha channel on the specified pixel. static void clearTopLayerAlphaPixel(GraphicsContext* context, int x, int y) { - SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()-> - canvas()->getTopPlatformDevice().accessBitmap(false)); + SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()->canvas()->getTopDevice()->accessBitmap(false)); *bitmap.getAddr32(x, y) &= 0x00FFFFFF; } @@ -559,9 +556,7 @@ TEST(TransparencyWin, Scale) // the helper goes out of scope. We don't want to call // clearTopLayerAlphaChannel because that will actually clear the whole // canvas (since we have no extra layer!). - SkBitmap& bitmap = const_cast<SkBitmap&>(helper.context()-> - platformContext()->canvas()->getTopPlatformDevice(). - accessBitmap(false)); + SkBitmap& bitmap = const_cast<SkBitmap&>(helper.context()->platformContext()->canvas()->getTopDevice()->accessBitmap(false)); *bitmap.getAddr32(2, 2) &= 0x00FFFFFF; helper.composite(); } |