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

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

Issue 2716203002: blink: Fix cc/paint skia type mismatches (Closed)
Patch Set: Fix canvas Created 3 years, 10 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 1b15e370946db83c88d5055daeca93ffd133e878..e2526a3e62fac9bd6a45786a6872c45b97256b31 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -622,20 +622,20 @@ ImageBitmap::ImageBitmap(HTMLVideoElement* video,
buffer->canvas()->translate(0, buffer->size().height());
buffer->canvas()->scale(1, -1);
}
- SkPaint paint;
+ PaintFlags flags;
if (parsedOptions.shouldScaleInput) {
float scaleRatioX = static_cast<float>(parsedOptions.resizeWidth) /
parsedOptions.cropRect.width();
float scaleRatioY = static_cast<float>(parsedOptions.resizeHeight) /
parsedOptions.cropRect.height();
buffer->canvas()->scale(scaleRatioX, scaleRatioY);
- paint.setFilterQuality(parsedOptions.resizeQuality);
+ flags.setFilterQuality(parsedOptions.resizeQuality);
}
buffer->canvas()->translate(dstPoint.x(), dstPoint.y());
video->paintCurrentFrame(
buffer->canvas(),
IntRect(IntPoint(), IntSize(video->videoWidth(), video->videoHeight())),
- parsedOptions.shouldScaleInput ? &paint : nullptr);
+ parsedOptions.shouldScaleInput ? &flags : nullptr);
sk_sp<SkImage> skiaImage =
buffer->newSkImageSnapshot(PreferNoAcceleration, SnapshotReasonUnknown);

Powered by Google App Engine
This is Rietveld 408576698