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

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

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Created 3 years, 9 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 0933dbf8ac4cb840bdc42fa13b90ef8a1332ccda..1c7e7ead8ee0beedbace1780c41a210cf612f817 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();
xlai (Olivia) 2017/03/09 21:57:27 Your CL is about decoupling canvas being composite
Justin Novosad 2017/03/10 21:09:59 For 2D canvas and WebGL, they are equivalent, but
+}
+
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