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

Unified Diff: Source/core/rendering/RenderLayerBacking.cpp

Issue 19315005: Introduce toHTMLCanvasElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderHTMLCanvas.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerBacking.cpp
diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp
index 31ca720fbd028c62cd83bacae880811df8eda3b3..35579d217e280ca73e8e4d2f2b6d1569fea719d9 100644
--- a/Source/core/rendering/RenderLayerBacking.cpp
+++ b/Source/core/rendering/RenderLayerBacking.cpp
@@ -75,7 +75,7 @@ static IntRect clipBox(RenderBox* renderer);
static inline bool isAcceleratedCanvas(RenderObject* renderer)
{
if (renderer->isCanvas()) {
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer->node());
+ HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node());
if (CanvasRenderingContext* context = canvas->renderingContext())
return context->isAccelerated();
}
@@ -407,7 +407,7 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
HTMLMediaElement* mediaElement = toMediaElement(renderer->node());
m_graphicsLayer->setContentsToMedia(mediaElement->platformLayer());
} else if (isAcceleratedCanvas(renderer)) {
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer->node());
+ HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node());
if (CanvasRenderingContext* context = canvas->renderingContext())
m_graphicsLayer->setContentsToCanvas(context->platformLayer());
layerConfigChanged = true;
« no previous file with comments | « Source/core/rendering/RenderHTMLCanvas.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698