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

Unified Diff: third_party/WebKit/Source/core/frame/ImageBitmap.cpp

Issue 1372463002: Re-land: Make 2D canvas smarter about chosing whether or not to use GPU acceleration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed assert Created 5 years, 3 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: third_party/WebKit/Source/core/frame/ImageBitmap.cpp
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
index 71b11d6ce45db61d40d0bcd4cec9c4e890c6157c..62388bc0fb578bd02059e4556ea598892a587f45 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -89,7 +89,7 @@ ImageBitmap::ImageBitmap(HTMLCanvasElement* canvas, const IntRect& cropRect)
IntRect srcRect = intersection(cropRect, IntRect(IntPoint(), canvas->size()));
m_bitmapRect = IntRect(IntPoint(std::max(0, -cropRect.x()), std::max(0, -cropRect.y())), srcRect.size());
ASSERT(canvas->isPaintable());
- m_bitmap = cropImage(canvas->copiedImage(BackBuffer), cropRect);
+ m_bitmap = cropImage(canvas->copiedImage(BackBuffer, PreferAcceleration), cropRect);
}
ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect)
@@ -196,7 +196,7 @@ PassRefPtr<Image> ImageBitmap::bitmapImage() const
return m_bitmap;
}
-PassRefPtr<Image> ImageBitmap::getSourceImageForCanvas(SourceImageStatus* status) const
+PassRefPtr<Image> ImageBitmap::getSourceImageForCanvas(SourceImageStatus* status, AccelerationHint) const
{
*status = NormalSourceImageStatus;
return bitmapImage();
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmap.h ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698