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

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

Issue 1609343004: Add display list fallback reason histograms for 2D canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding missing histogram Created 4 years, 11 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 8b15261e63ae2965a1dc172c04c2f1c6d0f94da7..23ebeb37bbe12a6800d05829f6ceaa223110d134 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -65,7 +65,7 @@ ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect, Docum
IntPoint dstPoint = IntPoint(std::max(0, -cropRect.x()), std::max(0, -cropRect.y()));
video->paintCurrentFrame(buffer->canvas(), IntRect(dstPoint, srcRect.size()), nullptr);
- m_image = StaticBitmapImage::create(buffer->newSkImageSnapshot(PreferNoAcceleration));
+ m_image = StaticBitmapImage::create(buffer->newSkImageSnapshot(PreferNoAcceleration, SnapshotReasonUnknown));
m_image->setOriginClean(!video->wouldTaintOrigin(document->securityOrigin()));
}
@@ -85,7 +85,7 @@ ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect)
return;
if (srcRect.isEmpty()) {
- m_image = StaticBitmapImage::create(buffer->newSkImageSnapshot(PreferNoAcceleration));
+ m_image = StaticBitmapImage::create(buffer->newSkImageSnapshot(PreferNoAcceleration, SnapshotReasonUnknown));
return;
}
@@ -95,7 +95,7 @@ ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect)
if (cropRect.y() < 0)
dstPoint.setY(-cropRect.y());
buffer->putByteArray(Unmultiplied, data->data()->data(), data->size(), srcRect, dstPoint);
- m_image = StaticBitmapImage::create(buffer->newSkImageSnapshot(PreferNoAcceleration));
+ m_image = StaticBitmapImage::create(buffer->newSkImageSnapshot(PreferNoAcceleration, SnapshotReasonUnknown));
}
ImageBitmap::ImageBitmap(ImageBitmap* bitmap, const IntRect& cropRect)
@@ -204,7 +204,7 @@ void ImageBitmap::notifyImageSourceChanged()
{
}
-PassRefPtr<Image> ImageBitmap::getSourceImageForCanvas(SourceImageStatus* status, AccelerationHint) const
+PassRefPtr<Image> ImageBitmap::getSourceImageForCanvas(SourceImageStatus* status, AccelerationHint, SnapshotReason) const
{
*status = NormalSourceImageStatus;
return m_image ? m_image : nullptr;

Powered by Google App Engine
This is Rietveld 408576698