diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp index a0ad0fb..9411e5a 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp +++ b/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp @@ -62,13 +62,18 @@ namespace WebCore { CCLayerImpl::CCLayerImpl(LayerChromium* owner) : m_owner(owner) + , m_anchorPoint(0.5, 0.5) + , m_anchorPointZ(0) + , m_doubleSided(true) + , m_masksToBounds(false) + , m_opacity(1.0) + , m_preserves3D(false) #ifndef NDEBUG , m_debugID(owner->debugID()) #endif , m_targetRenderSurface(0) , m_drawDepth(0) , m_drawOpacity(0) - , m_doubleSided(true) , m_debugBorderColor(0, 0, 0, 0) , m_debugBorderWidth(0) , m_renderSurface(0) @@ -107,7 +112,18 @@ RenderSurfaceChromium* CCLayerImpl::createRenderSurface() return m_renderSurface.get(); } -// These belong on CCLayerImpl, but should be subclased by each type and not defer to the LayerChromium subtypes. +bool CCLayerImpl::descendantsDrawsContent() +{ + const Vector<RefPtr<LayerChromium> >& sublayers = m_owner->getSublayers(); + for (size_t i = 0; i < sublayers.size(); ++i) { + sublayers[i]->createCCLayerImplIfNeeded(); + if (sublayers[i]->ccLayerImpl()->drawsContent() || sublayers[i]->ccLayerImpl()->descendantsDrawsContent()) + return true; + } + return false; +} + +// These belong on CCLayerImpl, but should be overridden by each type and not defer to the LayerChromium subtypes. bool CCLayerImpl::drawsContent() const { return m_owner->drawsContent(); @@ -118,6 +134,11 @@ void CCLayerImpl::draw() return m_owner->draw(); } +void CCLayerImpl::updateCompositorResources() +{ + return m_owner->updateCompositorResources(); +} + void CCLayerImpl::unreserveContentsTexture() { m_owner->unreserveContentsTexture(); @@ -167,7 +188,7 @@ void CCLayerImpl::drawDebugBorder() GLC(context, context->drawElements(GraphicsContext3D::LINE_LOOP, 4, GraphicsContext3D::UNSIGNED_SHORT, 6 * sizeof(unsigned short))); } -static void writeIndent(TextStream& ts, int indent) +void CCLayerImpl::writeIndent(TextStream& ts, int indent) { for (int i = 0; i != indent; ++i) ts << " "; |