summaryrefslogtreecommitdiffstats
path: root/skia/ext/vector_canvas_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'skia/ext/vector_canvas_linux.cc')
-rw-r--r--skia/ext/vector_canvas_linux.cc29
1 files changed, 2 insertions, 27 deletions
diff --git a/skia/ext/vector_canvas_linux.cc b/skia/ext/vector_canvas_linux.cc
index c3024f3..f2b8371 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
-