summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 23:34:10 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 23:34:10 +0000
commit49306751db60b2437a17dcfcedd616c4d97e7ee8 (patch)
treed2218de82349d7d85364539aebdcec1c75a4329c
parent356aa5469d5eb5e04d1661aafa86fa6f38006aae (diff)
downloadchromium_src-49306751db60b2437a17dcfcedd616c4d97e7ee8.zip
chromium_src-49306751db60b2437a17dcfcedd616c4d97e7ee8.tar.gz
chromium_src-49306751db60b2437a17dcfcedd616c4d97e7ee8.tar.bz2
Fix CC*Renderer and CC*LayerImpl to compile with Clang
BUG=none Review URL: https://chromiumcodereview.appspot.com/10942040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157654 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/CCDirectRenderer.cpp23
-rw-r--r--cc/CCDirectRenderer.h18
-rw-r--r--cc/CCIOSurfaceLayerImpl.cpp6
-rw-r--r--cc/CCIOSurfaceLayerImpl.h2
-rw-r--r--cc/CCLayerImpl.cpp25
-rw-r--r--cc/CCLayerImpl.h10
-rw-r--r--cc/CCLayerQuad.cpp8
-rw-r--r--cc/CCLayerQuad.h8
-rw-r--r--cc/CCLayerSorter.cpp23
-rw-r--r--cc/CCLayerSorter.h8
-rw-r--r--cc/CCLayerTreeHost.cpp41
-rw-r--r--cc/CCLayerTreeHost.h32
-rw-r--r--cc/CCLayerTreeHostCommon.cpp8
-rw-r--r--cc/CCLayerTreeHostCommon.h3
-rw-r--r--cc/CCLayerTreeHostImpl.cpp18
-rw-r--r--cc/CCLayerTreeHostImpl.h7
-rw-r--r--cc/CCRenderPass.cpp4
-rw-r--r--cc/CCRenderPass.h2
-rw-r--r--cc/CCRenderer.cpp21
-rw-r--r--cc/CCRenderer.h4
-rw-r--r--cc/CCRendererGL.cpp5
-rw-r--r--cc/CCRendererGL.h2
-rw-r--r--cc/CCResourceProvider.cpp58
-rw-r--r--cc/CCResourceProvider.h46
-rw-r--r--cc/CCScrollbarAnimationController.cpp5
-rw-r--r--cc/CCScrollbarAnimationController.h2
-rw-r--r--cc/CCScrollbarLayerImpl.cpp10
-rw-r--r--cc/CCScrollbarLayerImpl.h3
-rw-r--r--cc/CCSingleThreadProxy.cpp20
-rw-r--r--cc/CCSingleThreadProxy.h8
-rw-r--r--cc/CCTextureLayerImpl.cpp5
-rw-r--r--cc/CCTextureLayerImpl.h2
-rw-r--r--cc/CCTiledLayerImpl.cpp5
-rw-r--r--cc/CCTiledLayerImpl.h2
-rw-r--r--cc/CCVideoLayerImpl.cpp5
-rw-r--r--cc/CCVideoLayerImpl.h2
-rw-r--r--cc/cc.gyp1
37 files changed, 346 insertions, 106 deletions
diff --git a/cc/CCDirectRenderer.cpp b/cc/CCDirectRenderer.cpp
index d0590fa..a1a0ba7 100644
--- a/cc/CCDirectRenderer.cpp
+++ b/cc/CCDirectRenderer.cpp
@@ -48,6 +48,19 @@ static WebTransformationMatrix windowMatrix(int x, int y, int width, int height)
}
namespace cc {
+
+CCDirectRenderer::DrawingFrame::DrawingFrame()
+ : rootRenderPass(0)
+ , currentRenderPass(0)
+ , currentTexture(0)
+ , flippedY(false)
+{
+}
+
+CCDirectRenderer::DrawingFrame::~DrawingFrame()
+{
+}
+
//
// static
FloatRect CCDirectRenderer::quadVertexRect()
@@ -89,6 +102,16 @@ IntRect CCDirectRenderer::moveScissorToWindowSpace(const DrawingFrame& frame, Fl
return scissorRectInCanvasSpace;
}
+CCDirectRenderer::CCDirectRenderer(CCRendererClient* client, CCResourceProvider* resourceProvider)
+ : CCRenderer(client)
+ , m_resourceProvider(resourceProvider)
+{
+}
+
+CCDirectRenderer::~CCDirectRenderer()
+{
+}
+
void CCDirectRenderer::decideRenderPassAllocationsForFrame(const CCRenderPassList& renderPassesInDrawOrder)
{
HashMap<CCRenderPass::Id, const CCRenderPass*> renderPassesInFrame;
diff --git a/cc/CCDirectRenderer.h b/cc/CCDirectRenderer.h
index 3286ef5..c3407c0 100644
--- a/cc/CCDirectRenderer.h
+++ b/cc/CCDirectRenderer.h
@@ -19,7 +19,7 @@ class CCResourceProvider;
class CCDirectRenderer : public CCRenderer {
WTF_MAKE_NONCOPYABLE(CCDirectRenderer);
public:
- virtual ~CCDirectRenderer() { }
+ virtual ~CCDirectRenderer();
CCResourceProvider* resourceProvider() const { return m_resourceProvider; }
@@ -28,13 +28,12 @@ public:
virtual void drawFrame(const CCRenderPassList& renderPassesInDrawOrder, const CCRenderPassIdHashMap& renderPassesById) OVERRIDE;
protected:
- CCDirectRenderer(CCRendererClient* client, CCResourceProvider* resourceProvider)
- : CCRenderer(client)
- , m_resourceProvider(resourceProvider)
- {
- }
+ CCDirectRenderer(CCRendererClient* client, CCResourceProvider* resourceProvider);
struct DrawingFrame {
+ DrawingFrame();
+ ~DrawingFrame();
+
const CCRenderPassIdHashMap* renderPassesById;
const CCRenderPass* rootRenderPass;
const CCRenderPass* currentRenderPass;
@@ -46,13 +45,6 @@ protected:
WebKit::WebTransformationMatrix windowMatrix;
bool flippedY;
FloatRect scissorRectInRenderPassSpace;
-
- DrawingFrame()
- : rootRenderPass(0)
- , currentRenderPass(0)
- , currentTexture(0)
- , flippedY(false)
- { }
};
class CachedTexture : public CCScopedTexture {
diff --git a/cc/CCIOSurfaceLayerImpl.cpp b/cc/CCIOSurfaceLayerImpl.cpp
index cae6809..259fc93 100644
--- a/cc/CCIOSurfaceLayerImpl.cpp
+++ b/cc/CCIOSurfaceLayerImpl.cpp
@@ -107,6 +107,12 @@ void CCIOSurfaceLayerImpl::setIOSurfaceProperties(unsigned ioSurfaceId, const In
m_ioSurfaceId = ioSurfaceId;
m_ioSurfaceSize = size;
}
+
+const char* CCIOSurfaceLayerImpl::layerTypeAsString() const
+{
+ return "IOSurfaceLayer";
+}
+
}
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/cc/CCIOSurfaceLayerImpl.h b/cc/CCIOSurfaceLayerImpl.h
index 453afc0..4f94a5c 100644
--- a/cc/CCIOSurfaceLayerImpl.h
+++ b/cc/CCIOSurfaceLayerImpl.h
@@ -30,7 +30,7 @@ public:
private:
explicit CCIOSurfaceLayerImpl(int);
- virtual const char* layerTypeAsString() const OVERRIDE { return "IOSurfaceLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE;
unsigned m_ioSurfaceId;
IntSize m_ioSurfaceSize;
diff --git a/cc/CCLayerImpl.cpp b/cc/CCLayerImpl.cpp
index 9068d31..6f74a0a 100644
--- a/cc/CCLayerImpl.cpp
+++ b/cc/CCLayerImpl.cpp
@@ -313,6 +313,11 @@ void CCLayerImpl::noteLayerPropertyChangedForDescendants()
m_children[i]->noteLayerPropertyChangedForSubtree();
}
+const char* CCLayerImpl::layerTypeAsString() const
+{
+ return "LayerChromium";
+}
+
void CCLayerImpl::resetAllChangeTrackingForSubtree()
{
m_layerPropertyChanged = false;
@@ -333,11 +338,31 @@ void CCLayerImpl::resetAllChangeTrackingForSubtree()
m_children[i]->resetAllChangeTrackingForSubtree();
}
+bool CCLayerImpl::layerIsAlwaysDamaged() const
+{
+ return false;
+}
+
+int CCLayerImpl::id() const
+{
+ return m_layerId;
+}
+
+float CCLayerImpl::opacity() const
+{
+ return m_opacity;
+}
+
void CCLayerImpl::setOpacityFromAnimation(float opacity)
{
setOpacity(opacity);
}
+const WebKit::WebTransformationMatrix& CCLayerImpl::transform() const
+{
+ return m_transform;
+}
+
void CCLayerImpl::setTransformFromAnimation(const WebTransformationMatrix& transform)
{
setTransform(transform);
diff --git a/cc/CCLayerImpl.h b/cc/CCLayerImpl.h
index 3509ffd..d66c521 100644
--- a/cc/CCLayerImpl.h
+++ b/cc/CCLayerImpl.h
@@ -43,11 +43,11 @@ public:
virtual ~CCLayerImpl();
// CCLayerAnimationControllerClient implementation.
- virtual int id() const OVERRIDE { return m_layerId; }
+ virtual int id() const OVERRIDE;
virtual void setOpacityFromAnimation(float) OVERRIDE;
- virtual float opacity() const OVERRIDE { return m_opacity; }
+ virtual float opacity() const OVERRIDE;
virtual void setTransformFromAnimation(const WebKit::WebTransformationMatrix&) OVERRIDE;
- virtual const WebKit::WebTransformationMatrix& transform() const OVERRIDE { return m_transform; }
+ virtual const WebKit::WebTransformationMatrix& transform() const OVERRIDE;
// Tree structure.
CCLayerImpl* parent() const { return m_parent; }
@@ -232,7 +232,7 @@ public:
void resetAllChangeTrackingForSubtree();
- virtual bool layerIsAlwaysDamaged() const { return false; }
+ virtual bool layerIsAlwaysDamaged() const;
CCLayerAnimationController* layerAnimationController() { return m_layerAnimationController.get(); }
@@ -269,7 +269,7 @@ private:
// Note carefully this does not affect the current layer.
void noteLayerPropertyChangedForDescendants();
- virtual const char* layerTypeAsString() const { return "LayerChromium"; }
+ virtual const char* layerTypeAsString() const;
void dumpLayer(std::string*, int indent) const;
diff --git a/cc/CCLayerQuad.cpp b/cc/CCLayerQuad.cpp
index b51e425..9642622 100644
--- a/cc/CCLayerQuad.cpp
+++ b/cc/CCLayerQuad.cpp
@@ -37,6 +37,14 @@ CCLayerQuad::CCLayerQuad(const FloatQuad& quad)
m_bottom.scale(sign);
}
+CCLayerQuad::CCLayerQuad(const Edge& left, const Edge& top, const Edge& right, const Edge& bottom)
+ : m_left(left)
+ , m_top(top)
+ , m_right(right)
+ , m_bottom(bottom)
+{
+}
+
FloatQuad CCLayerQuad::floatQuad() const
{
return FloatQuad(m_left.intersect(m_top),
diff --git a/cc/CCLayerQuad.h b/cc/CCLayerQuad.h
index 03f161f..8be296f 100644
--- a/cc/CCLayerQuad.h
+++ b/cc/CCLayerQuad.h
@@ -75,13 +75,7 @@ public:
float m_z;
};
- CCLayerQuad(const Edge& left, const Edge& top, const Edge& right, const Edge& bottom)
- : m_left(left)
- , m_top(top)
- , m_right(right)
- , m_bottom(bottom)
- {
- }
+ CCLayerQuad(const Edge& left, const Edge& top, const Edge& right, const Edge& bottom);
CCLayerQuad(const FloatQuad&);
Edge left() const { return m_left; }
diff --git a/cc/CCLayerSorter.cpp b/cc/CCLayerSorter.cpp
index 1b643f5..cf85777 100644
--- a/cc/CCLayerSorter.cpp
+++ b/cc/CCLayerSorter.cpp
@@ -62,6 +62,25 @@ static bool edgeEdgeTest(const FloatPoint& a, const FloatPoint& b, const FloatPo
return true;
}
+CCLayerSorter::GraphNode::GraphNode(CCLayerImpl* cclayer)
+ : layer(cclayer)
+ , incomingEdgeWeight(0)
+{
+}
+
+CCLayerSorter::GraphNode::~GraphNode()
+{
+}
+
+CCLayerSorter::CCLayerSorter()
+ : m_zRange(0)
+{
+}
+
+CCLayerSorter::~CCLayerSorter()
+{
+}
+
// Checks whether layer "a" draws on top of layer "b". The weight value returned is an indication of
// the maximum z-depth difference between the layers or zero if the layers are found to be intesecting
// (some features are in front and some are behind).
@@ -132,6 +151,10 @@ CCLayerSorter::ABCompareResult CCLayerSorter::checkOverlap(LayerShape* a, LayerS
return BBeforeA;
}
+CCLayerSorter::LayerShape::LayerShape()
+{
+}
+
CCLayerSorter::LayerShape::LayerShape(float width, float height, const WebTransformationMatrix& drawTransform)
{
FloatQuad layerQuad(FloatRect(0, 0, width, height));
diff --git a/cc/CCLayerSorter.h b/cc/CCLayerSorter.h
index bb513b9..1ef659b 100644
--- a/cc/CCLayerSorter.h
+++ b/cc/CCLayerSorter.h
@@ -22,7 +22,8 @@ namespace cc {
class CCLayerSorter {
WTF_MAKE_NONCOPYABLE(CCLayerSorter);
public:
- CCLayerSorter() : m_zRange(0) { }
+ CCLayerSorter();
+ ~CCLayerSorter();
typedef Vector<CCLayerImpl*> LayerList;
@@ -30,7 +31,7 @@ public:
// Holds various useful properties derived from a layer's 3D outline.
struct LayerShape {
- LayerShape() { }
+ LayerShape();
LayerShape(float width, float height, const WebKit::WebTransformationMatrix& drawTransform);
float layerZFromProjectedPoint(const FloatPoint&) const;
@@ -53,7 +54,8 @@ private:
struct GraphEdge;
struct GraphNode {
- explicit GraphNode(CCLayerImpl* cclayer) : layer(cclayer), incomingEdgeWeight(0) { }
+ explicit GraphNode(CCLayerImpl* cclayer);
+ ~GraphNode();
CCLayerImpl* layer;
LayerShape shape;
diff --git a/cc/CCLayerTreeHost.cpp b/cc/CCLayerTreeHost.cpp
index 10dcda8..eacda97 100644
--- a/cc/CCLayerTreeHost.cpp
+++ b/cc/CCLayerTreeHost.cpp
@@ -36,6 +36,47 @@ namespace cc {
bool CCLayerTreeHost::s_needsFilterContext = false;
+CCLayerTreeSettings::CCLayerTreeSettings()
+ : acceleratePainting(false)
+ , showFPSCounter(false)
+ , showPlatformLayerTree(false)
+ , showPaintRects(false)
+ , showPropertyChangedRects(false)
+ , showSurfaceDamageRects(false)
+ , showScreenSpaceRects(false)
+ , showReplicaScreenSpaceRects(false)
+ , showOccludingRects(false)
+ , renderVSyncEnabled(true)
+ , refreshRate(0)
+ , maxPartialTextureUpdates(std::numeric_limits<size_t>::max())
+ , defaultTileSize(IntSize(256, 256))
+ , maxUntiledLayerSize(IntSize(512, 512))
+ , minimumOcclusionTrackingSize(IntSize(160, 160))
+{
+}
+
+CCLayerTreeSettings::~CCLayerTreeSettings()
+{
+}
+
+RendererCapabilities::RendererCapabilities()
+ : bestTextureFormat(0)
+ , contextHasCachedFrontBuffer(false)
+ , usingPartialSwap(false)
+ , usingAcceleratedPainting(false)
+ , usingSetVisibility(false)
+ , usingSwapCompleteCallback(false)
+ , usingGpuMemoryManager(false)
+ , usingDiscardFramebuffer(false)
+ , usingEglImage(false)
+ , maxTextureSize(0)
+{
+}
+
+RendererCapabilities::~RendererCapabilities()
+{
+}
+
bool CCLayerTreeHost::anyLayerTreeHostInstanceExists()
{
return numLayerTreeInstances > 0;
diff --git a/cc/CCLayerTreeHost.h b/cc/CCLayerTreeHost.h
index 4224c70..f89f251 100644
--- a/cc/CCLayerTreeHost.h
+++ b/cc/CCLayerTreeHost.h
@@ -35,23 +35,8 @@ class Region;
struct CCScrollAndScaleSet;
struct CCLayerTreeSettings {
- CCLayerTreeSettings()
- : acceleratePainting(false)
- , showFPSCounter(false)
- , showPlatformLayerTree(false)
- , showPaintRects(false)
- , showPropertyChangedRects(false)
- , showSurfaceDamageRects(false)
- , showScreenSpaceRects(false)
- , showReplicaScreenSpaceRects(false)
- , showOccludingRects(false)
- , renderVSyncEnabled(true)
- , refreshRate(0)
- , maxPartialTextureUpdates(std::numeric_limits<size_t>::max())
- , defaultTileSize(IntSize(256, 256))
- , maxUntiledLayerSize(IntSize(512, 512))
- , minimumOcclusionTrackingSize(IntSize(160, 160))
- { }
+ CCLayerTreeSettings();
+ ~CCLayerTreeSettings();
bool acceleratePainting;
bool showFPSCounter;
@@ -75,17 +60,8 @@ struct CCLayerTreeSettings {
// Provides information on an Impl's rendering capabilities back to the CCLayerTreeHost
struct RendererCapabilities {
- RendererCapabilities()
- : bestTextureFormat(0)
- , contextHasCachedFrontBuffer(false)
- , usingPartialSwap(false)
- , usingAcceleratedPainting(false)
- , usingSetVisibility(false)
- , usingSwapCompleteCallback(false)
- , usingGpuMemoryManager(false)
- , usingDiscardFramebuffer(false)
- , usingEglImage(false)
- , maxTextureSize(0) { }
+ RendererCapabilities();
+ ~RendererCapabilities();
GC3Denum bestTextureFormat;
bool contextHasCachedFrontBuffer;
diff --git a/cc/CCLayerTreeHostCommon.cpp b/cc/CCLayerTreeHostCommon.cpp
index d60d43c..6914bed 100644
--- a/cc/CCLayerTreeHostCommon.cpp
+++ b/cc/CCLayerTreeHostCommon.cpp
@@ -22,6 +22,14 @@ using WebKit::WebTransformationMatrix;
namespace cc {
+CCScrollAndScaleSet::CCScrollAndScaleSet()
+{
+}
+
+CCScrollAndScaleSet::~CCScrollAndScaleSet()
+{
+}
+
IntRect CCLayerTreeHostCommon::calculateVisibleRect(const IntRect& targetSurfaceRect, const IntRect& layerBoundRect, const WebTransformationMatrix& transform)
{
// Is this layer fully contained within the target surface?
diff --git a/cc/CCLayerTreeHostCommon.h b/cc/CCLayerTreeHostCommon.h
index d8710e9..117bb8b 100644
--- a/cc/CCLayerTreeHostCommon.h
+++ b/cc/CCLayerTreeHostCommon.h
@@ -43,6 +43,9 @@ public:
};
struct CCScrollAndScaleSet {
+ CCScrollAndScaleSet();
+ ~CCScrollAndScaleSet();
+
Vector<CCLayerTreeHostCommon::ScrollUpdateInfo> scrolls;
float pageScaleDelta;
};
diff --git a/cc/CCLayerTreeHostImpl.cpp b/cc/CCLayerTreeHostImpl.cpp
index 0c17573..47e2cab 100644
--- a/cc/CCLayerTreeHostImpl.cpp
+++ b/cc/CCLayerTreeHostImpl.cpp
@@ -89,6 +89,14 @@ private:
RefPtr<CCDelayBasedTimeSource> m_timeSource;
};
+CCLayerTreeHostImpl::FrameData::FrameData()
+{
+}
+
+CCLayerTreeHostImpl::FrameData::~FrameData()
+{
+}
+
PassOwnPtr<CCLayerTreeHostImpl> CCLayerTreeHostImpl::create(const CCLayerTreeSettings& settings, CCLayerTreeHostImplClient* client)
{
return adoptPtr(new CCLayerTreeHostImpl(settings, client));
@@ -587,6 +595,16 @@ bool CCLayerTreeHostImpl::swapBuffers()
return m_renderer->swapBuffers();
}
+const IntSize& CCLayerTreeHostImpl::deviceViewportSize() const
+{
+ return m_deviceViewportSize;
+}
+
+const CCLayerTreeSettings& CCLayerTreeHostImpl::settings() const
+{
+ return m_settings;
+}
+
void CCLayerTreeHostImpl::didLoseContext()
{
m_client->didLoseContextOnImplThread();
diff --git a/cc/CCLayerTreeHostImpl.h b/cc/CCLayerTreeHostImpl.h
index b4c30c9..c0f3c1c 100644
--- a/cc/CCLayerTreeHostImpl.h
+++ b/cc/CCLayerTreeHostImpl.h
@@ -65,6 +65,9 @@ public:
virtual void scheduleAnimation() OVERRIDE;
struct FrameData : public CCRenderPassSink {
+ FrameData();
+ ~FrameData();
+
Vector<IntRect> occludingScreenSpaceRects;
CCRenderPassList renderPasses;
CCRenderPassIdHashMap renderPassesById;
@@ -90,8 +93,8 @@ public:
void didDrawAllLayers(const FrameData&);
// CCRendererClient implementation
- virtual const IntSize& deviceViewportSize() const OVERRIDE { return m_deviceViewportSize; }
- virtual const CCLayerTreeSettings& settings() const OVERRIDE { return m_settings; }
+ virtual const IntSize& deviceViewportSize() const OVERRIDE;
+ virtual const CCLayerTreeSettings& settings() const OVERRIDE;
virtual void didLoseContext() OVERRIDE;
virtual void onSwapBuffersComplete() OVERRIDE;
virtual void setFullRootLayerDamage() OVERRIDE;
diff --git a/cc/CCRenderPass.cpp b/cc/CCRenderPass.cpp
index 0d98a3a..3d67843 100644
--- a/cc/CCRenderPass.cpp
+++ b/cc/CCRenderPass.cpp
@@ -33,6 +33,10 @@ CCRenderPass::CCRenderPass(Id id, IntRect outputRect, const WebKit::WebTransform
ASSERT(id.index >= 0);
}
+CCRenderPass::~CCRenderPass()
+{
+}
+
PassOwnPtr<CCRenderPass> CCRenderPass::copy(Id newId) const
{
ASSERT(newId != m_id);
diff --git a/cc/CCRenderPass.h b/cc/CCRenderPass.h
index b2ca8aa..8a7a2a3 100644
--- a/cc/CCRenderPass.h
+++ b/cc/CCRenderPass.h
@@ -40,6 +40,8 @@ typedef Vector<OwnPtr<CCSharedQuadState> > CCSharedQuadStateList;
class CCRenderPass {
WTF_MAKE_NONCOPYABLE(CCRenderPass);
public:
+ ~CCRenderPass();
+
struct Id {
int layerId;
int index;
diff --git a/cc/CCRenderer.cpp b/cc/CCRenderer.cpp
new file mode 100644
index 0000000..69c04df
--- /dev/null
+++ b/cc/CCRenderer.cpp
@@ -0,0 +1,21 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+
+#include "CCRenderer.h"
+
+namespace cc {
+
+bool CCRenderer::haveCachedResourcesForRenderPassId(CCRenderPass::Id) const
+{
+ return false;
+}
+
+bool CCRenderer::isContextLost()
+{
+ return false;
+}
+
+}
diff --git a/cc/CCRenderer.h b/cc/CCRenderer.h
index c28df4f0..78a6081 100644
--- a/cc/CCRenderer.h
+++ b/cc/CCRenderer.h
@@ -52,7 +52,7 @@ public:
virtual void viewportChanged() { }
virtual void decideRenderPassAllocationsForFrame(const CCRenderPassList&) { }
- virtual bool haveCachedResourcesForRenderPassId(CCRenderPass::Id) const { return false; }
+ virtual bool haveCachedResourcesForRenderPassId(CCRenderPass::Id) const;
virtual void drawFrame(const CCRenderPassList&, const CCRenderPassIdHashMap&) = 0;
@@ -65,7 +65,7 @@ public:
virtual void getFramebufferPixels(void *pixels, const IntRect&) = 0;
- virtual bool isContextLost() { return false; }
+ virtual bool isContextLost();
virtual void setVisible(bool) = 0;
diff --git a/cc/CCRendererGL.cpp b/cc/CCRendererGL.cpp
index b310ca7..f86e96c 100644
--- a/cc/CCRendererGL.cpp
+++ b/cc/CCRendererGL.cpp
@@ -150,6 +150,11 @@ CCRendererGL::~CCRendererGL()
cleanupSharedObjects();
}
+const RendererCapabilities& CCRendererGL::capabilities() const
+{
+ return m_capabilities;
+}
+
WebGraphicsContext3D* CCRendererGL::context()
{
return m_context;
diff --git a/cc/CCRendererGL.h b/cc/CCRendererGL.h
index fb2e0e8..400a8d3 100644
--- a/cc/CCRendererGL.h
+++ b/cc/CCRendererGL.h
@@ -43,7 +43,7 @@ public:
virtual ~CCRendererGL();
- virtual const RendererCapabilities& capabilities() const OVERRIDE { return m_capabilities; }
+ virtual const RendererCapabilities& capabilities() const OVERRIDE;
WebKit::WebGraphicsContext3D* context();
diff --git a/cc/CCResourceProvider.cpp b/cc/CCResourceProvider.cpp
index 4c58769..54811f0 100644
--- a/cc/CCResourceProvider.cpp
+++ b/cc/CCResourceProvider.cpp
@@ -49,6 +49,64 @@ static bool isTextureFormatSupportedForStorage(GC3Denum format)
return (format == GraphicsContext3D::RGBA || format == Extensions3D::BGRA_EXT);
}
+CCResourceProvider::TransferableResourceList::TransferableResourceList()
+{
+}
+
+CCResourceProvider::TransferableResourceList::~TransferableResourceList()
+{
+}
+
+CCResourceProvider::Resource::Resource()
+ : glId(0)
+ , pixels(0)
+ , pool(0)
+ , lockForReadCount(0)
+ , lockedForWrite(false)
+ , external(false)
+ , exported(false)
+ , size()
+ , format(0)
+ , type(static_cast<ResourceType>(0))
+{
+}
+
+CCResourceProvider::Resource::Resource(unsigned textureId, int pool, const IntSize& size, GC3Denum format)
+ : glId(textureId)
+ , pixels(0)
+ , pool(pool)
+ , lockForReadCount(0)
+ , lockedForWrite(false)
+ , external(false)
+ , exported(false)
+ , size(size)
+ , format(format)
+ , type(GLTexture)
+{
+}
+
+CCResourceProvider::Resource::Resource(uint8_t* pixels, int pool, const IntSize& size, GC3Denum format)
+ : glId(0)
+ , pixels(pixels)
+ , pool(pool)
+ , lockForReadCount(0)
+ , lockedForWrite(false)
+ , external(false)
+ , exported(false)
+ , size(size)
+ , format(format)
+ , type(Bitmap)
+{
+}
+
+CCResourceProvider::Child::Child()
+{
+}
+
+CCResourceProvider::Child::~Child()
+{
+}
+
PassOwnPtr<CCResourceProvider> CCResourceProvider::create(CCGraphicsContext* context, TextureUploaderOption option)
{
OwnPtr<CCResourceProvider> resourceProvider(adoptPtr(new CCResourceProvider(context)));
diff --git a/cc/CCResourceProvider.h b/cc/CCResourceProvider.h
index 83f27ef..8ccfbd7 100644
--- a/cc/CCResourceProvider.h
+++ b/cc/CCResourceProvider.h
@@ -57,6 +57,9 @@ public:
};
typedef Vector<TransferableResource> TransferableResourceArray;
struct TransferableResourceList {
+ TransferableResourceList();
+ ~TransferableResourceList();
+
TransferableResourceArray resources;
unsigned syncPoint;
};
@@ -208,42 +211,10 @@ public:
private:
struct Resource {
- Resource()
- : glId(0)
- , pixels(0)
- , pool(0)
- , lockForReadCount(0)
- , lockedForWrite(false)
- , external(false)
- , exported(false)
- , size()
- , format(0)
- , type(static_cast<ResourceType>(0))
- { }
- Resource(unsigned textureId, int pool, const IntSize& size, GC3Denum format)
- : glId(textureId)
- , pixels(0)
- , pool(pool)
- , lockForReadCount(0)
- , lockedForWrite(false)
- , external(false)
- , exported(false)
- , size(size)
- , format(format)
- , type(GLTexture)
- { }
- Resource(uint8_t* pixels, int pool, const IntSize& size, GC3Denum format)
- : glId(0)
- , pixels(pixels)
- , pool(pool)
- , lockForReadCount(0)
- , lockedForWrite(false)
- , external(false)
- , exported(false)
- , size(size)
- , format(format)
- , type(Bitmap)
- { }
+ Resource();
+ Resource(unsigned textureId, int pool, const IntSize& size, GC3Denum format);
+ Resource(uint8_t* pixels, int pool, const IntSize& size, GC3Denum format);
+
unsigned glId;
uint8_t* pixels;
int pool;
@@ -257,6 +228,9 @@ private:
};
typedef HashMap<ResourceId, Resource> ResourceMap;
struct Child {
+ Child();
+ ~Child();
+
int pool;
ResourceIdMap childToParentMap;
ResourceIdMap parentToChildMap;
diff --git a/cc/CCScrollbarAnimationController.cpp b/cc/CCScrollbarAnimationController.cpp
index 2146c25..89f74cb 100644
--- a/cc/CCScrollbarAnimationController.cpp
+++ b/cc/CCScrollbarAnimationController.cpp
@@ -40,6 +40,11 @@ CCScrollbarAnimationController::~CCScrollbarAnimationController()
{
}
+bool CCScrollbarAnimationController::animate(double)
+{
+ return false;
+}
+
void CCScrollbarAnimationController::didPinchGestureBegin()
{
didPinchGestureBeginAtTime(monotonicallyIncreasingTime());
diff --git a/cc/CCScrollbarAnimationController.h b/cc/CCScrollbarAnimationController.h
index 627ea6b..bb387d7 100644
--- a/cc/CCScrollbarAnimationController.h
+++ b/cc/CCScrollbarAnimationController.h
@@ -23,7 +23,7 @@ public:
virtual ~CCScrollbarAnimationController();
- virtual bool animate(double monotonicTime) { return false; }
+ virtual bool animate(double monotonicTime);
void didPinchGestureBegin();
void didPinchGestureUpdate();
void didPinchGestureEnd();
diff --git a/cc/CCScrollbarLayerImpl.cpp b/cc/CCScrollbarLayerImpl.cpp
index b62d5cb..63be4f5 100644
--- a/cc/CCScrollbarLayerImpl.cpp
+++ b/cc/CCScrollbarLayerImpl.cpp
@@ -41,6 +41,10 @@ CCScrollbarLayerImpl::CCScrollbarLayerImpl(int id)
{
}
+CCScrollbarLayerImpl::~CCScrollbarLayerImpl()
+{
+}
+
void CCScrollbarLayerImpl::setScrollbarGeometry(PassOwnPtr<CCScrollbarGeometryFixedThumb> geometry)
{
m_geometry = geometry;
@@ -191,5 +195,11 @@ bool CCScrollbarLayerImpl::CCScrollbar::isCustomScrollbar() const
return m_owner->m_isCustomScrollbar;
}
+const char* CCScrollbarLayerImpl::layerTypeAsString() const
+{
+ return "ScrollbarLayer";
}
+
+}
+
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/cc/CCScrollbarLayerImpl.h b/cc/CCScrollbarLayerImpl.h
index 0db2ae1..a720718 100644
--- a/cc/CCScrollbarLayerImpl.h
+++ b/cc/CCScrollbarLayerImpl.h
@@ -20,6 +20,7 @@ class ScrollView;
class CCScrollbarLayerImpl : public CCLayerImpl {
public:
static PassOwnPtr<CCScrollbarLayerImpl> create(int id);
+ virtual ~CCScrollbarLayerImpl();
CCScrollbarGeometryFixedThumb* scrollbarGeometry() const { return m_geometry.get(); }
void setScrollbarGeometry(PassOwnPtr<CCScrollbarGeometryFixedThumb>);
@@ -76,6 +77,8 @@ private:
};
+ virtual const char* layerTypeAsString() const OVERRIDE;
+
CCScrollbar m_scrollbar;
CCResourceProvider::ResourceId m_backTrackResourceId;
diff --git a/cc/CCSingleThreadProxy.cpp b/cc/CCSingleThreadProxy.cpp
index 8ec53ed..3b331de 100644
--- a/cc/CCSingleThreadProxy.cpp
+++ b/cc/CCSingleThreadProxy.cpp
@@ -227,6 +227,11 @@ void CCSingleThreadProxy::didAddAnimation()
{
}
+size_t CCSingleThreadProxy::maxPartialTextureUpdates() const
+{
+ return std::numeric_limits<size_t>::max();
+}
+
void CCSingleThreadProxy::stop()
{
TRACE_EVENT0("cc", "CCSingleThreadProxy::stop");
@@ -242,6 +247,16 @@ void CCSingleThreadProxy::stop()
m_layerTreeHost = 0;
}
+void CCSingleThreadProxy::setNeedsRedrawOnImplThread()
+{
+ m_layerTreeHost->scheduleComposite();
+}
+
+void CCSingleThreadProxy::setNeedsCommitOnImplThread()
+{
+ m_layerTreeHost->scheduleComposite();
+}
+
void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector> events, double wallClockTime)
{
ASSERT(CCProxy::isImplThread());
@@ -273,6 +288,11 @@ void CCSingleThreadProxy::forceSerializeOnSwapBuffers()
}
}
+void CCSingleThreadProxy::onSwapBuffersCompleteOnImplThread()
+{
+ ASSERT_NOT_REACHED();
+}
+
bool CCSingleThreadProxy::commitAndComposite()
{
ASSERT(CCProxy::isMainThread());
diff --git a/cc/CCSingleThreadProxy.h b/cc/CCSingleThreadProxy.h
index a38aa7f..e8d0f05 100644
--- a/cc/CCSingleThreadProxy.h
+++ b/cc/CCSingleThreadProxy.h
@@ -40,17 +40,17 @@ public:
virtual void didAddAnimation() OVERRIDE;
virtual void start() OVERRIDE;
virtual void stop() OVERRIDE;
- virtual size_t maxPartialTextureUpdates() const OVERRIDE { return std::numeric_limits<size_t>::max(); }
+ virtual size_t maxPartialTextureUpdates() const OVERRIDE;
virtual void acquireLayerTextures() OVERRIDE { }
virtual void forceSerializeOnSwapBuffers() OVERRIDE;
// CCLayerTreeHostImplClient implementation
virtual void didLoseContextOnImplThread() OVERRIDE { }
- virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE { ASSERT_NOT_REACHED(); }
+ virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE;
virtual void onVSyncParametersChanged(double monotonicTimebase, double intervalInSeconds) OVERRIDE { }
virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE { }
- virtual void setNeedsRedrawOnImplThread() OVERRIDE { m_layerTreeHost->scheduleComposite(); }
- virtual void setNeedsCommitOnImplThread() OVERRIDE { m_layerTreeHost->scheduleComposite(); }
+ virtual void setNeedsRedrawOnImplThread() OVERRIDE;
+ virtual void setNeedsCommitOnImplThread() OVERRIDE;
virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE;
virtual void releaseContentsTexturesOnImplThread() OVERRIDE;
diff --git a/cc/CCTextureLayerImpl.cpp b/cc/CCTextureLayerImpl.cpp
index f262297..ce08c2d 100644
--- a/cc/CCTextureLayerImpl.cpp
+++ b/cc/CCTextureLayerImpl.cpp
@@ -74,6 +74,11 @@ void CCTextureLayerImpl::didLoseContext()
m_externalTextureResource = 0;
}
+const char* CCTextureLayerImpl::layerTypeAsString() const
+{
+ return "TextureLayer";
+}
+
}
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/cc/CCTextureLayerImpl.h b/cc/CCTextureLayerImpl.h
index f7d0de6..fcb1470 100644
--- a/cc/CCTextureLayerImpl.h
+++ b/cc/CCTextureLayerImpl.h
@@ -34,7 +34,7 @@ public:
private:
explicit CCTextureLayerImpl(int);
- virtual const char* layerTypeAsString() const OVERRIDE { return "TextureLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE;
unsigned m_textureId;
CCResourceProvider::ResourceId m_externalTextureResource;
diff --git a/cc/CCTiledLayerImpl.cpp b/cc/CCTiledLayerImpl.cpp
index ead258a..7693082 100644
--- a/cc/CCTiledLayerImpl.cpp
+++ b/cc/CCTiledLayerImpl.cpp
@@ -214,6 +214,11 @@ void CCTiledLayerImpl::didLoseContext()
m_tiler->reset();
}
+const char* CCTiledLayerImpl::layerTypeAsString() const
+{
+ return "ContentLayer";
+}
+
} // namespace cc
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/cc/CCTiledLayerImpl.h b/cc/CCTiledLayerImpl.h
index 56d3521..13edb05 100644
--- a/cc/CCTiledLayerImpl.h
+++ b/cc/CCTiledLayerImpl.h
@@ -45,7 +45,7 @@ protected:
private:
- virtual const char* layerTypeAsString() const OVERRIDE { return "ContentLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE;
DrawableTile* tileAt(int, int) const;
DrawableTile* createTile(int, int);
diff --git a/cc/CCVideoLayerImpl.cpp b/cc/CCVideoLayerImpl.cpp
index becf213..dd15459 100644
--- a/cc/CCVideoLayerImpl.cpp
+++ b/cc/CCVideoLayerImpl.cpp
@@ -381,6 +381,11 @@ void CCVideoLayerImpl::dumpLayerProperties(std::string* str, int indent) const
CCLayerImpl::dumpLayerProperties(str, indent);
}
+const char* CCVideoLayerImpl::layerTypeAsString() const
+{
+ return "VideoLayer";
+}
+
}
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/cc/CCVideoLayerImpl.h b/cc/CCVideoLayerImpl.h
index cc65b1f..814513e 100644
--- a/cc/CCVideoLayerImpl.h
+++ b/cc/CCVideoLayerImpl.h
@@ -62,7 +62,7 @@ private:
CCVideoLayerImpl(int, WebKit::WebVideoFrameProvider*);
static IntSize computeVisibleSize(const WebKit::WebVideoFrame&, unsigned plane);
- virtual const char* layerTypeAsString() const OVERRIDE { return "VideoLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE;
void willDrawInternal(CCResourceProvider*);
bool allocatePlaneData(CCResourceProvider*);
diff --git a/cc/cc.gyp b/cc/cc.gyp
index 95ac454..70bbe5b 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -95,6 +95,7 @@
'CCRenderSurface.h',
'CCRenderSurfaceFilters.cpp',
'CCRenderSurfaceFilters.h',
+ 'CCRenderer.cpp',
'CCRenderer.h',
'CCRendererGL.cpp',
'CCRendererGL.h',