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

Unified Diff: skia/ext/platform_device_win.cc

Issue 1467403002: Move Windows DC-initialization to skia_utils_win.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-metafile-from-device
Patch Set: Rebase again Created 5 years, 1 month 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/platform_device.h ('k') | skia/ext/skia_utils_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_device_win.cc
diff --git a/skia/ext/platform_device_win.cc b/skia/ext/platform_device_win.cc
index 79b2c30b0574d2fb04d4f02040dea71c4176a88d..d1b37ef638ee682b5513760cf5ccca06729cf216 100644
--- a/skia/ext/platform_device_win.cc
+++ b/skia/ext/platform_device_win.cc
@@ -11,45 +11,6 @@
namespace skia {
-void InitializeDC(HDC context) {
- // Enables world transformation.
- // If the GM_ADVANCED graphics mode is set, GDI always draws arcs in the
- // counterclockwise direction in logical space. This is equivalent to the
- // statement that, in the GM_ADVANCED graphics mode, both arc control points
- // and arcs themselves fully respect the device context's world-to-device
- // transformation.
- BOOL res = SetGraphicsMode(context, GM_ADVANCED);
- SkASSERT(res != 0);
-
- // Enables dithering.
- res = SetStretchBltMode(context, HALFTONE);
- SkASSERT(res != 0);
- // As per SetStretchBltMode() documentation, SetBrushOrgEx() must be called
- // right after.
- res = SetBrushOrgEx(context, 0, 0, NULL);
- SkASSERT(res != 0);
-
- // Sets up default orientation.
- res = SetArcDirection(context, AD_CLOCKWISE);
- SkASSERT(res != 0);
-
- // Sets up default colors.
- res = SetBkColor(context, RGB(255, 255, 255));
- SkASSERT(res != CLR_INVALID);
- res = SetTextColor(context, RGB(0, 0, 0));
- SkASSERT(res != CLR_INVALID);
- res = SetDCBrushColor(context, RGB(255, 255, 255));
- SkASSERT(res != CLR_INVALID);
- res = SetDCPenColor(context, RGB(0, 0, 0));
- SkASSERT(res != CLR_INVALID);
-
- // Sets up default transparency.
- res = SetBkMode(context, OPAQUE);
- SkASSERT(res != 0);
- res = SetROP2(context, R2_COPYPEN);
- SkASSERT(res != 0);
-}
-
PlatformSurface PlatformDevice::BeginPlatformPaint() {
return 0;
}
« no previous file with comments | « skia/ext/platform_device.h ('k') | skia/ext/skia_utils_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698