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

Unified Diff: skia/ext/vector_canvas_linux.cc

Issue 3590011: Update use of SkCanvas and SkDevice to match change in Skia (Closed)
Patch Set: Bump deps again to bring in fix for memory leak Created 10 years, 2 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_canvas.cc ('k') | skia/ext/vector_canvas_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_canvas_linux.cc
diff --git a/skia/ext/vector_canvas_linux.cc b/skia/ext/vector_canvas_linux.cc
index c3024f3dbc49b72994a7272bed0905580c8c9443..f2b837101bbd419c9703a28a2d9d14d219734e82 100644
--- a/skia/ext/vector_canvas_linux.cc
+++ b/skia/ext/vector_canvas_linux.cc
@@ -4,7 +4,6 @@
#include "skia/ext/vector_canvas.h"
-#include "skia/ext/bitmap_platform_device.h"
#include "skia/ext/vector_platform_device.h"
namespace skia {
@@ -16,7 +15,8 @@ VectorCanvas::VectorCanvas(cairo_t* context, int width, int height) {
}
bool VectorCanvas::initialize(cairo_t* context, int width, int height) {
- SkDevice* device = createPlatformDevice(context, width, height, true);
+ SkDevice* device = SkVectorPlatformDeviceFactory::CreateDevice(context, width,
+ height, true);
if (!device)
return false;
@@ -25,29 +25,4 @@ bool VectorCanvas::initialize(cairo_t* context, int width, int height) {
return true;
}
-SkDevice* VectorCanvas::createDevice(SkBitmap::Config config,
- int width, int height,
- bool is_opaque, bool isForLayer) {
- SkASSERT(config == SkBitmap::kARGB_8888_Config);
- return createPlatformDevice(NULL, width, height, is_opaque);
-}
-
-SkDevice* VectorCanvas::createPlatformDevice(cairo_t* context,
- int width,
- int height,
- bool is_opaque) {
- // 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.
- // Fallback to bitmap when context is NULL.
- if (!is_opaque || NULL == context) {
- return BitmapPlatformDevice::Create(width, height, is_opaque);
- }
-
- PlatformDevice* device =
- VectorPlatformDevice::create(context, width, height);
- return device;
-}
-
} // namespace skia
-
« no previous file with comments | « skia/ext/vector_canvas.cc ('k') | skia/ext/vector_canvas_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698