summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp b/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp
index bbde998..691fbca 100644
--- a/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp
@@ -85,11 +85,9 @@ PassRefPtr<Image> ImageBuffer::copyImage() const
SkDevice* device = canvas->getDevice();
const SkBitmap& orig = device->accessBitmap(false);
- if (!PlatformBridge::canSatisfyMemoryAllocation(orig.getSize()))
- return 0;
-
SkBitmap copy;
- orig.copyTo(&copy, orig.config());
+ if (PlatformBridge::canSatisfyMemoryAllocation(orig.getSize()))
+ orig.copyTo(&copy, orig.config());
SkBitmapRef* ref = new SkBitmapRef(copy);
RefPtr<Image> image = BitmapImage::create(ref, 0);