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

Unified Diff: skia/ext/vector_platform_device_skia.cc

Issue 7273013: Stop using deprecated factory API for SkDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: skia/ext/vector_platform_device_skia.cc
===================================================================
--- skia/ext/vector_platform_device_skia.cc (revision 90617)
+++ skia/ext/vector_platform_device_skia.cc (working copy)
@@ -13,19 +13,6 @@
namespace skia {
-SkDevice* VectorPlatformDeviceSkiaFactory::newDevice(SkCanvas* canvas,
- SkBitmap::Config config,
- int width, int height,
- bool isOpaque,
- bool isForLayer) {
- SkASSERT(config == SkBitmap::kARGB_8888_Config);
- SkRefPtr<SkDevice> device = factory_.newDevice(canvas, config, width, height,
- isOpaque, isForLayer);
- device->unref(); // SkRefPtr and new both took a reference.
- SkPDFDevice* pdf_device = static_cast<SkPDFDevice*>(device.get());
- return new VectorPlatformDeviceSkia(pdf_device);
-}
-
static inline SkBitmap makeABitmap(int width, int height) {
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kNo_Config, width, height);
@@ -224,8 +211,10 @@
#endif
-SkDeviceFactory* VectorPlatformDeviceSkia::onNewDeviceFactory() {
- return SkNEW(VectorPlatformDeviceSkiaFactory);
+SkDevice* VectorPlatformDeviceSkia::onCreateCompatibleDevice(
+ SkBitmap::Config config, int width, int height,
+ bool isOpaque, Usage) {
+ return pdf_device_->createCompatibleDevice(config, width, height, isOpaque);
vandebo (ex-Chrome) 2011/06/28 19:07:54 To do it this way, at least VectorPlatformDeviceSk
}
} // namespace skia
« skia/ext/vector_platform_device_emf_win.cc ('K') | « skia/ext/vector_platform_device_skia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698