Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: skia/ext/bitmap_platform_device_win.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « skia/ext/bitmap_platform_device_win.h ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71bb8006534c7349e4ba7733f126fe19b6c58ae9..0f16694ea662143f20bd884cd22e0bf9993f2b4e 100644
--- a/skia/ext/bitmap_platform_device_win.cc
+++ b/skia/ext/bitmap_platform_device_win.cc
@@ -55,6 +55,15 @@ HBITMAP CreateHBitmap(int width, int height, bool is_opaque,
namespace skia {
+void DrawToNativeContext(SkCanvas* canvas, HDC hdc, int x, int y,
+ const RECT* src_rect) {
+ PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas));
+ if (platform_device)
+ platform_device->DrawToHDC(hdc, x, y, src_rect);
+}
+
+void PlatformDevice::DrawToHDC(HDC, int x, int y, const RECT* src_rect) {}
+
HDC BitmapPlatformDevice::GetBitmapDC() {
if (!hdc_) {
hdc_ = CreateCompatibleDC(NULL);
@@ -202,8 +211,8 @@ void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
SetMatrixClip(transform, region);
}
-void BitmapPlatformDevice::DrawToNativeContext(HDC dc, int x, int y,
- const RECT* src_rect) {
+void BitmapPlatformDevice::DrawToHDC(HDC dc, int x, int y,
+ const RECT* src_rect) {
bool created_dc = !IsBitmapDCCreated();
HDC source_dc = BeginPlatformPaint();
« no previous file with comments | « skia/ext/bitmap_platform_device_win.h ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698