| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index 2b11d48670b148fad2330a31a67ba95c030d952d..3558e22e3a2b927fae7c352ded30e0df0d1068a3 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -110,11 +110,11 @@ static IntRect backgroundRect(const LayoutObject& layoutObject) {
|
| return pixelSnappedIntRect(box.backgroundRect(BackgroundClipRect));
|
| }
|
|
|
| -static inline bool isAcceleratedCanvas(const LayoutObject& layoutObject) {
|
| +static inline bool isCompositedCanvas(const LayoutObject& layoutObject) {
|
| if (layoutObject.isCanvas()) {
|
| HTMLCanvasElement* canvas = toHTMLCanvasElement(layoutObject.node());
|
| if (CanvasRenderingContext* context = canvas->renderingContext())
|
| - return context->isAccelerated();
|
| + return context->isComposited();
|
| }
|
| return false;
|
| }
|
| @@ -158,7 +158,7 @@ static WebLayer* platformLayerForPlugin(LayoutObject& layoutObject) {
|
| }
|
|
|
| static inline bool isAcceleratedContents(LayoutObject& layoutObject) {
|
| - return isAcceleratedCanvas(layoutObject) ||
|
| + return isCompositedCanvas(layoutObject) ||
|
| (layoutObject.isEmbeddedObject() &&
|
| toLayoutEmbeddedObject(layoutObject)
|
| .requiresAcceleratedCompositing()) ||
|
| @@ -402,7 +402,7 @@ void CompositedLayerMapping::
|
| }
|
|
|
| void CompositedLayerMapping::updateContentsOpaque() {
|
| - if (isAcceleratedCanvas(layoutObject())) {
|
| + if (isCompositedCanvas(layoutObject())) {
|
| CanvasRenderingContext* context =
|
| toHTMLCanvasElement(layoutObject().node())->renderingContext();
|
| WebLayer* layer = context ? context->platformLayer() : nullptr;
|
| @@ -767,7 +767,7 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration() {
|
| m_graphicsLayer->setContentsToPlatformLayer(
|
| canvas->surfaceLayerBridge()->getWebLayer());
|
| layerConfigChanged = true;
|
| - } else if (isAcceleratedCanvas(layoutObject)) {
|
| + } else if (isCompositedCanvas(layoutObject)) {
|
| HTMLCanvasElement* canvas = toHTMLCanvasElement(layoutObject.node());
|
| if (CanvasRenderingContext* context = canvas->renderingContext())
|
| m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer());
|
| @@ -1700,7 +1700,7 @@ void CompositedLayerMapping::updateDrawsContent() {
|
|
|
| m_drawsBackgroundOntoContentLayer = false;
|
|
|
| - if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) {
|
| + if (hasPaintedContent && isCompositedCanvas(layoutObject())) {
|
| CanvasRenderingContext* context =
|
| toHTMLCanvasElement(layoutObject().node())->renderingContext();
|
| // Content layer may be null if context is lost.
|
| @@ -2616,7 +2616,7 @@ void CompositedLayerMapping::contentChanged(ContentChangeType changeType) {
|
| return;
|
| }
|
|
|
| - if (changeType == CanvasChanged && isAcceleratedCanvas(layoutObject())) {
|
| + if (changeType == CanvasChanged && isCompositedCanvas(layoutObject())) {
|
| m_graphicsLayer->setContentsNeedsDisplay();
|
| return;
|
| }
|
|
|