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

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

Issue 2557783002: Improve metrics for display list canvas fallback reason (Closed)
Patch Set: Created 4 years 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 3bebb361f49c1496e6fa794cf165950cf6d99f1d..d4eb061adb600eedb1b46629522b6de8c766c249 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -472,10 +472,12 @@ ImageBitmap::ImageBitmap(HTMLCanvasElement* canvas,
const ImageBitmapOptions& options) {
ASSERT(canvas->isPaintable());
RefPtr<Image> input;
- if (canvas->placeholderFrame())
+ if (canvas->placeholderFrame()) {
input = canvas->placeholderFrame();
- else
- input = canvas->copiedImage(BackBuffer, PreferAcceleration);
+ } else {
+ input = canvas->copiedImage(BackBuffer, PreferAcceleration,
+ SnapshotReasonCreateImageBitmap);
+ }
ParsedOptions parsedOptions =
parseOptions(options, cropRect, IntSize(input->width(), input->height()));
if (dstBufferSizeHasOverflow(parsedOptions))
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698