| Index: skia/ext/bitmap_platform_device_win.cc
|
| diff --git a/skia/ext/bitmap_platform_device_win.cc b/skia/ext/bitmap_platform_device_win.cc
|
| index 8270be329cc820f64cec2840ea4e42263304d22c..d537ca06c20a0dc529359f2eaf119621d89f1f5e 100644
|
| --- a/skia/ext/bitmap_platform_device_win.cc
|
| +++ b/skia/ext/bitmap_platform_device_win.cc
|
| @@ -48,6 +48,19 @@ void DrawToNativeContext(SkCanvas* canvas, HDC destination_hdc, int x, int y,
|
| canvas->getTotalMatrix());
|
| }
|
|
|
| +HDC GetNativeDrawingContext(SkCanvas* canvas) {
|
| + PlatformDevice* platform_device = GetPlatformDevice(canvas->getTopDevice(true));
|
| + if (!platform_device)
|
| + return nullptr;
|
| +
|
| + // Compensate for drawing to a layer rather than the entire canvas
|
| + SkMatrix ctm;
|
| + SkIRect clip_bounds;
|
| + canvas->temporary_internal_describeTopLayer(&ctm, &clip_bounds);
|
| +
|
| + return platform_device->BeginPlatformPaint(ctm, clip_bounds);
|
| +}
|
| +
|
| HDC BitmapPlatformDevice::GetBitmapDC(const SkMatrix& transform,
|
| const SkIRect& clip_bounds) {
|
| if (!hdc_) {
|
|
|