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

Unified Diff: skia/ext/vector_platform_device_emf_win.cc

Issue 7193040: Revert 91504 - Stop using deprecated factory API for SkDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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') | skia/ext/vector_platform_device_skia.h » ('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
===================================================================
--- skia/ext/vector_platform_device_emf_win.cc (revision 91504)
+++ skia/ext/vector_platform_device_emf_win.cc (working copy)
@@ -12,10 +12,18 @@
namespace skia {
+SkDevice* VectorPlatformDeviceEmfFactory::newDevice(SkCanvas* unused,
+ SkBitmap::Config config,
+ int width, int height,
+ bool isOpaque,
+ bool isForLayer) {
+ SkASSERT(config == SkBitmap::kARGB_8888_Config);
+ return CreateDevice(width, height, isOpaque, NULL);
+}
+
//static
-PlatformDevice* VectorPlatformDeviceEmf::CreateDevice(int width, int height,
- bool is_opaque,
- HANDLE shared_section) {
+PlatformDevice* VectorPlatformDeviceEmfFactory::CreateDevice(
+ int width, int height, bool is_opaque, HANDLE shared_section) {
if (!is_opaque) {
// TODO(maruel): http://crbug.com/18382 When restoring a semi-transparent
// layer, i.e. merging it, we need to rasterize it because GDI doesn't
@@ -107,6 +115,10 @@
SkASSERT(previous_pen_ == NULL);
}
+SkDeviceFactory* VectorPlatformDeviceEmf::onNewDeviceFactory() {
+ return SkNEW(VectorPlatformDeviceEmfFactory);
+}
+
HDC VectorPlatformDeviceEmf::BeginPlatformPaint() {
return hdc_;
}
@@ -438,13 +450,6 @@
LoadClippingRegionToDC(hdc_, clip_region_, t);
}
-SkDevice* VectorPlatformDeviceEmf::onCreateCompatibleDevice(
- SkBitmap::Config config, int width, int height, bool isOpaque,
- Usage /*usage*/) {
- SkASSERT(config == SkBitmap::kARGB_8888_Config);
- return VectorPlatformDeviceEmf::CreateDevice(width, height, isOpaque, NULL);
-}
-
bool VectorPlatformDeviceEmf::CreateBrush(bool use_brush, COLORREF color) {
SkASSERT(previous_brush_ == NULL);
// We can't use SetDCBrushColor() or DC_BRUSH when drawing to a EMF buffer.
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.h ('k') | skia/ext/vector_platform_device_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698