Chromium Code Reviews| 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); |
| } |