diff options
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r-- | Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp | 6 |
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(©, orig.config()); + if (PlatformBridge::canSatisfyMemoryAllocation(orig.getSize())) + orig.copyTo(©, orig.config()); SkBitmapRef* ref = new SkBitmapRef(copy); RefPtr<Image> image = BitmapImage::create(ref, 0); |