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

Unified Diff: skia/ext/vector_platform_device_emf_win.cc

Issue 7633040: CL removing inheritance of SkDevice from PlatformDevice. Flavours of PlatformDevice classes now ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 98225)
+++ skia/ext/vector_platform_device_emf_win.cc (working copy)
@@ -15,9 +15,8 @@
namespace skia {
//static
-PlatformDevice* VectorPlatformDeviceEmf::CreateDevice(int width, int height,
- bool is_opaque,
- HANDLE shared_section) {
+SkDevice* VectorPlatformDeviceEmf::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
@@ -40,7 +39,7 @@
// SkScalarRound(value) as SkScalarRound(value * 10). Safari is already
// doing the same for text rendering.
SkASSERT(shared_section);
- PlatformDevice* device = VectorPlatformDeviceEmf::create(
+ SkDevice* device = VectorPlatformDeviceEmf::create(
reinterpret_cast<HDC>(shared_section), width, height);
return device;
}
@@ -59,9 +58,7 @@
hdr->biClrImportant = 0;
}
-VectorPlatformDeviceEmf* VectorPlatformDeviceEmf::create(HDC dc,
- int width,
- int height) {
+SkDevice* VectorPlatformDeviceEmf::create(HDC dc, int width, int height) {
InitializeDC(dc);
// Link the SkBitmap to the current selected bitmap in the device context.
@@ -96,12 +93,13 @@
}
VectorPlatformDeviceEmf::VectorPlatformDeviceEmf(HDC dc, const SkBitmap& bitmap)
- : PlatformDevice(bitmap),
+ : SkDevice(bitmap),
hdc_(dc),
previous_brush_(NULL),
previous_pen_(NULL),
alpha_blend_used_(false) {
transform_.reset();
+ SetPlatformDevice(this, this);
}
VectorPlatformDeviceEmf::~VectorPlatformDeviceEmf() {
@@ -865,4 +863,3 @@
}
} // namespace skia
-
« 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