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

Unified Diff: skia/ext/vector_platform_device_cairo_linux.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_cairo_linux.h ('k') | skia/ext/vector_platform_device_emf_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_platform_device_cairo_linux.cc
===================================================================
--- skia/ext/vector_platform_device_cairo_linux.cc (revision 98225)
+++ skia/ext/vector_platform_device_cairo_linux.cc (working copy)
@@ -69,9 +69,8 @@
namespace skia {
// static
-PlatformDevice* VectorPlatformDeviceCairo::CreateDevice(cairo_t* context,
- int width, int height,
- bool isOpaque) {
+SkDevice* VectorPlatformDeviceCairo::CreateDevice(cairo_t* context, int width,
+ int height, bool isOpaque) {
// TODO(myhuang): Here we might also have similar issues as those on Windows
// (vector_canvas_win.cc, http://crbug.com/18382 & http://crbug.com/18383).
// Please note that is_opaque is true when we use this class for printing.
@@ -92,10 +91,12 @@
VectorPlatformDeviceCairo::VectorPlatformDeviceCairo(PlatformSurface context,
const SkBitmap& bitmap)
- : PlatformDevice(bitmap),
+ : SkDevice(bitmap),
context_(context) {
SkASSERT(bitmap.getConfig() == SkBitmap::kARGB_8888_Config);
+ SetPlatformDevice(this, this);
+
// Increase the reference count to keep the context alive.
cairo_reference(context_);
@@ -107,11 +108,16 @@
cairo_destroy(context_);
}
-PlatformDevice::PlatformSurface
-VectorPlatformDeviceCairo::BeginPlatformPaint() {
+PlatformSurface VectorPlatformDeviceCairo::BeginPlatformPaint() {
return context_;
}
+void VectorPlatformDeviceCairo::DrawToNativeContext(
+ PlatformSurface surface, int x, int y, const PlatformRect* src_rect) {
+ // Should never be called on Linux.
+ SkASSERT(false);
+}
+
SkDevice* VectorPlatformDeviceCairo::onCreateCompatibleDevice(
SkBitmap::Config config,
int width, int height,
« no previous file with comments | « skia/ext/vector_platform_device_cairo_linux.h ('k') | skia/ext/vector_platform_device_emf_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698