Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / core / SkDevice.cpp
index 299d445..36a8a75 100644 (file)
@@ -33,53 +33,13 @@ SkBaseDevice::~SkBaseDevice() {
 }
 
 SkBaseDevice* SkBaseDevice::createCompatibleDevice(const SkImageInfo& info) {
-#ifdef SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG
-    // We call the old method to support older subclasses.
-    // If they have, we return their device, else we use the new impl.
-    SkBitmap::Config config = SkColorTypeToBitmapConfig(info.colorType());
-    SkBaseDevice* dev = this->onCreateCompatibleDevice(config,
-                                                       info.width(),
-                                                       info.height(),
-                                                       info.isOpaque(),
-                                                       kGeneral_Usage);
-    if (dev) {
-        return dev;
-    }
-    // fall through to new impl
-#endif
     return this->onCreateDevice(info, kGeneral_Usage);
 }
 
 SkBaseDevice* SkBaseDevice::createCompatibleDeviceForSaveLayer(const SkImageInfo& info) {
-#ifdef SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG
-    // We call the old method to support older subclasses.
-    // If they have, we return their device, else we use the new impl.
-    SkBitmap::Config config = SkColorTypeToBitmapConfig(info.colorType());
-    SkBaseDevice* dev = this->onCreateCompatibleDevice(config,
-                                                       info.width(),
-                                                       info.height(),
-                                                       info.isOpaque(),
-                                                       kSaveLayer_Usage);
-    if (dev) {
-        return dev;
-    }
-    // fall through to new impl
-#endif
     return this->onCreateDevice(info, kSaveLayer_Usage);
 }
 
-#ifdef SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG
-SkBaseDevice* SkBaseDevice::createCompatibleDevice(SkBitmap::Config config,
-                                                   int width, int height,
-                                                   bool isOpaque) {
-    SkImageInfo info = SkImageInfo::Make(width, height,
-                                         SkBitmapConfigToColorType(config),
-                                         isOpaque ? kOpaque_SkAlphaType
-                                                  : kPremul_SkAlphaType);
-    return this->createCompatibleDevice(info);
-}
-#endif
-
 SkMetaData& SkBaseDevice::getMetaData() {
     // metadata users are rare, so we lazily allocate it. If that changes we
     // can decide to just make it a field in the device (rather than a ptr)
@@ -175,7 +135,11 @@ void SkBaseDevice::EXPERIMENTAL_optimize(SkPicture* picture) {
     // The base class doesn't perform any analysis but derived classes may
 }
 
-bool SkBaseDevice::EXPERIMENTAL_drawPicture(const SkPicture& picture) {
+void SkBaseDevice::EXPERIMENTAL_purge(SkPicture* picture) {
+    // Derived-classes may have data to purge but not the base class
+}
+
+bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas* canvas, SkPicture* picture) {
     // The base class doesn't perform any accelerated picture rendering
     return false;
 }