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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Fixed expectations Created 3 years, 8 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/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index 8f6767796066a44800e8da3a8e5d0c2e5f596026..b50753e2448ae3b9d1a481e0238f2133153aea6e 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -172,6 +172,10 @@ bool CanvasRenderingContext2D::isAccelerated() const {
return canvas()->buffer()->isAccelerated();
}
+bool CanvasRenderingContext2D::isComposited() const {
+ return isAccelerated();
+}
+
void CanvasRenderingContext2D::stop() {
if (!isContextLost()) {
// Never attempt to restore the context because the page is being torn down.
@@ -825,7 +829,7 @@ void CanvasRenderingContext2D::drawTextInternal(
// anti-aliasing, which is expected when !creationAttributes().alpha(), so we
// need to fall out of display list mode when drawing text to an opaque
// canvas. crbug.com/583809
- if (!creationAttributes().alpha() && !isAccelerated()) {
+ if (!creationAttributes().alpha() && !isComposited()) {
canvas()->disableDeferral(
DisableDeferralReasonSubPixelTextAntiAliasingSupport);
}

Powered by Google App Engine
This is Rietveld 408576698