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

Unified Diff: skia/ext/vector_platform_device_emf_win.cc

Issue 6677142: rename getBitmapDC to beginPlatformPaint and add calls to endPlatformPaint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 9 months 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/vector_platform_device_emf_win.h ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_platform_device_emf_win.cc
diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc
index d86ad3df7312b274c7e4087f3b9ad336da9ebaa4..07d108305091fffc92ea961b3b8c471480c34e6b 100644
--- a/skia/ext/vector_platform_device_emf_win.cc
+++ b/skia/ext/vector_platform_device_emf_win.cc
@@ -194,13 +194,14 @@ void VectorPlatformDeviceEmf::drawRect(const SkDraw& draw,
if (!ApplyPaint(paint)) {
return;
}
- HDC dc = getBitmapDC();
+ HDC dc = beginPlatformPaint();
if (!Rectangle(dc, SkScalarRound(rect.fLeft),
SkScalarRound(rect.fTop),
SkScalarRound(rect.fRight),
SkScalarRound(rect.fBottom))) {
SkASSERT(false);
}
+ endPlatformPaint();
Cleanup();
}
@@ -226,7 +227,7 @@ void VectorPlatformDeviceEmf::drawPath(const SkDraw& draw,
if (!ApplyPaint(paint)) {
return;
}
- HDC dc = getBitmapDC();
+ HDC dc = beginPlatformPaint();
PlatformDevice::LoadPathToDC(dc, path);
switch (paint.getStyle()) {
case SkPaint::kFill_Style: {
@@ -248,6 +249,7 @@ void VectorPlatformDeviceEmf::drawPath(const SkDraw& draw,
SkASSERT(false);
break;
}
+ endPlatformPaint();
Cleanup();
}
@@ -632,7 +634,6 @@ void VectorPlatformDeviceEmf::InternalDrawBitmap(const SkBitmap& bitmap,
bitmap_header.bV4BlueMask = 0x000000ff;
bitmap_header.bV4AlphaMask = 0xff000000;
- HDC dc = getBitmapDC();
SkAutoLockPixels lock(bitmap);
SkASSERT(bitmap.getConfig() == SkBitmap::kARGB_8888_Config);
const uint32_t* pixels = static_cast<const uint32_t*>(bitmap.getPixels());
@@ -655,6 +656,7 @@ void VectorPlatformDeviceEmf::InternalDrawBitmap(const SkBitmap& bitmap,
}
}
+ HDC dc = beginPlatformPaint();
BITMAPINFOHEADER hdr;
FillBitmapInfoHeader(src_size_x, src_size_y, &hdr);
if (is_translucent) {
@@ -720,6 +722,7 @@ void VectorPlatformDeviceEmf::InternalDrawBitmap(const SkBitmap& bitmap,
SRCCOPY);
SkASSERT(result);
}
+ endPlatformPaint();
Cleanup();
}
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.h ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698