+2012-04-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Add OVERRIDE annotations for cc layer types
+ https://bugs.webkit.org/show_bug.cgi?id=83658
+
+ Reviewed by Daniel Bates.
+
+ This adds OVERRIDE annotations to overrides of functions on these classes:
+ - CCLayerImpl
+ - LayerChromium
+ - TiledLayerChromium
+
+ * platform/graphics/chromium/Canvas2DLayerChromium.h:
+ (Canvas2DLayerChromium):
+ * platform/graphics/chromium/CanvasLayerChromium.h:
+ (CanvasLayerChromium):
+ * platform/graphics/chromium/ContentLayerChromium.h:
+ (ContentLayerChromium):
+ * platform/graphics/chromium/ImageLayerChromium.h:
+ (ImageLayerChromium):
+ * platform/graphics/chromium/PluginLayerChromium.h:
+ (PluginLayerChromium):
+ * platform/graphics/chromium/TiledLayerChromium.h:
+ (TiledLayerChromium):
+ * platform/graphics/chromium/VideoLayerChromium.h:
+ (VideoLayerChromium):
+ * platform/graphics/chromium/WebGLLayerChromium.h:
+ (WebGLLayerChromium):
+ * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
+ (CCScrollbarLayerImpl):
+ * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
+ (CCSolidColorLayerImpl):
+ * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
+ (CCTextureLayerImpl):
+ * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
+ (CCTiledLayerImpl):
+ * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
+ (CCVideoLayerImpl):
+
2012-04-11 Alexey Proskuryakov <ap@apple.com>
[Mac] lang, xml:lang, content-language ignored when choosing fonts
void setTextureId(unsigned);
- virtual void setNeedsDisplayRect(const FloatRect&);
+ virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE;
- virtual bool drawsContent() const;
- virtual void update(CCTextureUpdater&, const CCOcclusionTracker*);
- virtual void pushPropertiesTo(CCLayerImpl*);
- virtual void unreserveContentsTexture();
+ virtual bool drawsContent() const OVERRIDE;
+ virtual void update(CCTextureUpdater&, const CCOcclusionTracker*) OVERRIDE;
+ virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
+ virtual void unreserveContentsTexture() OVERRIDE;
void setCanvas(SkCanvas*);
// Base class for WebGL and accelerated 2d canvases.
class CanvasLayerChromium : public LayerChromium {
public:
- virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl();
+ virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
protected:
CanvasLayerChromium();
void clearDelegate() { m_delegate = 0; }
- virtual bool drawsContent() const;
- virtual void update(CCTextureUpdater&, const CCOcclusionTracker*);
- virtual void idleUpdate(CCTextureUpdater&, const CCOcclusionTracker*);
+ virtual bool drawsContent() const OVERRIDE;
+ virtual void update(CCTextureUpdater&, const CCOcclusionTracker*) OVERRIDE;
+ virtual void idleUpdate(CCTextureUpdater&, const CCOcclusionTracker*) OVERRIDE;
- virtual void setOpaque(bool);
+ virtual void setOpaque(bool) OVERRIDE;
protected:
explicit ContentLayerChromium(ContentLayerDelegate*);
private:
- virtual LayerTextureUpdater* textureUpdater() const { return m_textureUpdater.get(); }
- virtual void createTextureUpdaterIfNeeded();
+ virtual LayerTextureUpdater* textureUpdater() const OVERRIDE { return m_textureUpdater.get(); }
+ virtual void createTextureUpdaterIfNeeded() OVERRIDE;
ContentLayerDelegate* m_delegate;
RefPtr<LayerTextureUpdater> m_textureUpdater;
static PassRefPtr<ImageLayerChromium> create();
virtual ~ImageLayerChromium();
- virtual bool drawsContent() const;
- virtual void update(CCTextureUpdater&, const CCOcclusionTracker*);
- virtual bool needsContentsScale() const;
+ virtual bool drawsContent() const OVERRIDE;
+ virtual void update(CCTextureUpdater&, const CCOcclusionTracker*) OVERRIDE;
+ virtual bool needsContentsScale() const OVERRIDE;
void setContents(Image* image);
void setTilingOption(TilingOption);
- virtual LayerTextureUpdater* textureUpdater() const;
- virtual void createTextureUpdaterIfNeeded();
- virtual IntSize contentBounds() const;
+ virtual LayerTextureUpdater* textureUpdater() const OVERRIDE;
+ virtual void createTextureUpdaterIfNeeded() OVERRIDE;
+ virtual IntSize contentBounds() const OVERRIDE;
NativeImagePtr m_imageForCurrentFrame;
RefPtr<Image> m_contents;
public:
static PassRefPtr<PluginLayerChromium> create();
- virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl();
+ virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
// Code path for plugins which supply their own texture ID.
void setTextureId(unsigned textureId);
void setIOSurfaceProperties(int width, int height, uint32_t ioSurfaceId);
uint32_t getIOSurfaceId() const;
- virtual void pushPropertiesTo(CCLayerImpl*);
+ virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
protected:
PluginLayerChromium();
virtual ~TiledLayerChromium();
- virtual void setIsMask(bool);
+ virtual void setIsMask(bool) OVERRIDE;
- virtual void pushPropertiesTo(CCLayerImpl*);
+ virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
- virtual bool drawsContent() const;
- virtual bool needsContentsScale() const;
+ virtual bool drawsContent() const OVERRIDE;
+ virtual bool needsContentsScale() const OVERRIDE;
- virtual IntSize contentBounds() const;
+ virtual IntSize contentBounds() const OVERRIDE;
- virtual void setNeedsDisplayRect(const FloatRect&);
+ virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE;
- virtual void setIsNonCompositedContent(bool);
+ virtual void setIsNonCompositedContent(bool) OVERRIDE;
- virtual void setLayerTreeHost(CCLayerTreeHost*);
+ virtual void setLayerTreeHost(CCLayerTreeHost*) OVERRIDE;
// Reserves all existing and valid tile textures to protect them from being
// recycled by the texture manager.
void protectTileTextures(const IntRect& layerRect);
- virtual void reserveTextures();
+ virtual void reserveTextures() OVERRIDE;
- virtual Region visibleContentOpaqueRegion() const;
+ virtual Region visibleContentOpaqueRegion() const OVERRIDE;
protected:
TiledLayerChromium();
bool skipsDraw() const { return m_skipsDraw; }
- virtual void protectVisibleTileTextures();
+ virtual void protectVisibleTileTextures() OVERRIDE;
+ // Virtual for testing
virtual TextureManager* textureManager() const;
private:
- virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl();
+ virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
void createTilerIfNeeded();
void setTilingOption(TilingOption);
static PassRefPtr<VideoLayerChromium> create(VideoFrameProvider* = 0);
virtual ~VideoLayerChromium();
- virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl();
+ virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
private:
explicit VideoLayerChromium(VideoFrameProvider*);
virtual ~WebGLLayerChromium();
- virtual bool drawsContent() const;
- virtual void update(CCTextureUpdater&, const CCOcclusionTracker*);
- virtual void pushPropertiesTo(CCLayerImpl*);
- virtual void setNeedsDisplayRect(const FloatRect&);
+ virtual bool drawsContent() const OVERRIDE;
+ virtual void update(CCTextureUpdater&, const CCOcclusionTracker*) OVERRIDE;
+ virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
+ virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE;
bool paintRenderedResultsToCanvas(ImageBuffer*);
GraphicsContext3D* context() const;
CCLayerImpl* scrollLayer() const { return m_scrollLayer; }
void setScrollLayer(CCLayerImpl* scrollLayer) { m_scrollLayer = scrollLayer; }
- virtual void willDraw(LayerRendererChromium*);
- virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles);
- virtual void didDraw();
+ virtual void willDraw(LayerRendererChromium*) OVERRIDE;
+ virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles) OVERRIDE;
+ virtual void didDraw() OVERRIDE;
protected:
explicit CCScrollbarLayerImpl(int id);
}
virtual ~CCSolidColorLayerImpl();
- virtual TransformationMatrix quadTransform() const;
- virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles);
+ virtual TransformationMatrix quadTransform() const OVERRIDE;
+ virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles) OVERRIDE;
protected:
explicit CCSolidColorLayerImpl(int id);
private:
- virtual const char* layerTypeAsString() const { return "SolidColorLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE { return "SolidColorLayer"; }
const int m_tileSize;
};
}
virtual ~CCTextureLayerImpl();
- virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles);
+ virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles) OVERRIDE;
typedef ProgramBinding<VertexShaderPosTex, FragmentShaderRGBATexFlipAlpha> ProgramFlip;
typedef ProgramBinding<VertexShaderPosTexStretch, FragmentShaderRGBATexAlpha> ProgramStretch;
typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexRectAlpha> TexRectProgram;
typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexRectFlipAlpha> TexRectProgramFlip;
- virtual void willDraw(LayerRendererChromium*);
- virtual void didLoseContext();
+ virtual void willDraw(LayerRendererChromium*) OVERRIDE;
+ virtual void didLoseContext() OVERRIDE;
- virtual void dumpLayerProperties(TextStream&, int indent) const;
+ virtual void dumpLayerProperties(TextStream&, int indent) const OVERRIDE;
unsigned textureId() const { return m_textureId; }
void setTextureId(unsigned id) { m_textureId = id; }
private:
explicit CCTextureLayerImpl(int);
- virtual const char* layerTypeAsString() const { return "TextureLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE { return "TextureLayer"; }
unsigned m_textureId;
bool m_hasAlpha;
}
virtual ~CCTiledLayerImpl();
- virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles);
+ virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles) OVERRIDE;
- virtual void bindContentsTexture(LayerRendererChromium*);
+ virtual void bindContentsTexture(LayerRendererChromium*) OVERRIDE;
- virtual void dumpLayerProperties(TextStream&, int indent) const;
+ virtual void dumpLayerProperties(TextStream&, int indent) const OVERRIDE;
void setSkipsDraw(bool skipsDraw) { m_skipsDraw = skipsDraw; }
void setTilingData(const CCLayerTilingData& tiler);
void setContentsSwizzled(bool contentsSwizzled) { m_contentsSwizzled = contentsSwizzled; }
bool contentsSwizzled() const { return m_contentsSwizzled; }
- virtual Region visibleContentOpaqueRegion() const;
+ virtual Region visibleContentOpaqueRegion() const OVERRIDE;
typedef ProgramBinding<VertexShaderTile, FragmentShaderRGBATexAlpha> Program;
// Shader program that swaps red and blue components of texture.
bool hasTileAt(int, int) const;
bool hasTextureIdForTileAt(int, int) const;
- virtual TransformationMatrix quadTransform() const;
+ virtual TransformationMatrix quadTransform() const OVERRIDE;
private:
- virtual const char* layerTypeAsString() const { return "ContentLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE { return "ContentLayer"; }
DrawableTile* tileAt(int, int) const;
DrawableTile* createTile(int, int);
}
virtual ~CCVideoLayerImpl();
- virtual void willDraw(LayerRendererChromium*);
- virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles);
- virtual void didDraw();
+ virtual void willDraw(LayerRendererChromium*) OVERRIDE;
+ virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& hadMissingTiles) OVERRIDE;
+ virtual void didDraw() OVERRIDE;
typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexFlipAlpha> RGBAProgram;
typedef ProgramBinding<VertexShaderPosTexYUVStretch, FragmentShaderYUVVideo> YUVProgram;
typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexFlipAlpha> NativeTextureProgram;
typedef ProgramBinding<VertexShaderVideoTransform, FragmentShaderOESImageExternal> StreamTextureProgram;
- virtual void dumpLayerProperties(TextStream&, int indent) const;
+ virtual void dumpLayerProperties(TextStream&, int indent) const OVERRIDE;
Mutex& providerMutex() { return m_providerMutex; }
VideoFrameProvider* provider() const { return m_provider; }
explicit CCVideoLayerImpl(int, VideoFrameProvider*);
static IntSize computeVisibleSize(const VideoFrameChromium*, unsigned plane);
- virtual const char* layerTypeAsString() const { return "VideoLayer"; }
+ virtual const char* layerTypeAsString() const OVERRIDE { return "VideoLayer"; }
bool reserveTextures(const VideoFrameChromium*, GC3Denum format, LayerRendererChromium*);
+2012-04-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Add OVERRIDE annotations for cc layer types
+ https://bugs.webkit.org/show_bug.cgi?id=83658
+
+ Reviewed by Daniel Bates.
+
+ This adds OVERRIDE annotations to overrides of functions on these classes:
+ - CCLayerImpl
+ - LayerChromium
+ - TiledLayerChromium
+
+ * src/WebLayerImpl.cpp:
+ * src/WebLayerImpl.h:
+ (WebLayerImpl): Removed unused and empty paintContents() function.
+ * tests/CCLayerIteratorTest.cpp:
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ * tests/CCLayerTreeHostImplTest.cpp:
+ * tests/CCLayerTreeHostTest.cpp:
+ * tests/CCOcclusionTrackerTest.cpp:
+ * tests/CCTiledLayerTestCommon.h:
+ (FakeTiledLayerChromium):
+ * tests/LayerChromiumTest.cpp:
+ * tests/TreeSynchronizerTest.cpp:
+
2012-04-11 James Robinson <jamesr@chromium.org>
[chromium] Add OVERRIDE annotations for cc animation-related interfaces
{
}
-void WebLayerImpl::paintContents(GraphicsContext&, const IntRect& clip)
-{
-}
-
} // namespace WebKit
protected:
WebLayerImpl();
virtual ~WebLayerImpl();
- virtual void paintContents(WebCore::GraphicsContext&, const WebCore::IntRect& clip);
};
} // namespace WebKit
int m_countRepresentingContributingSurface;
int m_countRepresentingItself;
- virtual bool drawsContent() const { return m_drawsContent; }
+ virtual bool drawsContent() const OVERRIDE { return m_drawsContent; }
void setDrawsContent(bool drawsContent) { m_drawsContent = drawsContent; }
private:
{
}
- virtual bool drawsContent() const { return true; }
+ virtual bool drawsContent() const OVERRIDE { return true; }
};
TEST(CCLayerTreeHostCommonTest, verifyTransformsForNoOpLayer)
public:
static PassOwnPtr<BlendStateCheckLayer> create(int id) { return adoptPtr(new BlendStateCheckLayer(id)); }
- virtual void appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&)
+ virtual void appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&) OVERRIDE
{
m_quadsAppended = true;
public:
static PassOwnPtr<ContextLostNotificationCheckLayer> create(int id) { return adoptPtr(new ContextLostNotificationCheckLayer(id)); }
- virtual void didLoseContext()
+ virtual void didLoseContext() OVERRIDE
{
m_didLoseContextCalled = true;
}
int idlePaintContentsCount() { return m_idlePaintContentsCount; }
void resetPaintContentsCount() { m_paintContentsCount = 0; m_idlePaintContentsCount = 0;}
- virtual void update(CCTextureUpdater& updater, const CCOcclusionTracker* occlusion)
+ virtual void update(CCTextureUpdater& updater, const CCOcclusionTracker* occlusion) OVERRIDE
{
ContentLayerChromium::update(updater, occlusion);
m_paintContentsCount++;
}
- virtual void idleUpdate(CCTextureUpdater& updater, const CCOcclusionTracker* occlusion)
+ virtual void idleUpdate(CCTextureUpdater& updater, const CCOcclusionTracker* occlusion) OVERRIDE
{
ContentLayerChromium::idleUpdate(updater, occlusion);
m_idlePaintContentsCount++;
public:
static PassRefPtr<TestLayerChromium> create() { return adoptRef(new TestLayerChromium()); }
- virtual void update(CCTextureUpdater&, const CCOcclusionTracker* occlusion)
+ virtual void update(CCTextureUpdater&, const CCOcclusionTracker* occlusion) OVERRIDE
{
// Gain access to internals of the CCOcclusionTracker.
const TestCCOcclusionTracker* testOcclusion = static_cast<const TestCCOcclusionTracker*>(occlusion);
m_occludedScreenSpace = testOcclusion ? testOcclusion->occlusionInScreenSpace() : Region();
}
- virtual bool drawsContent() const { return true; }
+ virtual bool drawsContent() const OVERRIDE { return true; }
const Region& occludedScreenSpace() const { return m_occludedScreenSpace; }
void clearOccludedScreenSpace() { m_occludedScreenSpace = Region(); }
{
}
- virtual bool drawsContent() const { return true; }
- virtual Region visibleContentOpaqueRegion() const
+ virtual bool drawsContent() const OVERRIDE { return true; }
+ virtual Region visibleContentOpaqueRegion() const OVERRIDE
{
if (m_overrideOpaqueContentsRect)
return intersection(m_opaqueContentsRect, visibleLayerRect());
setDrawsContent(true);
}
- virtual Region visibleContentOpaqueRegion() const
+ virtual Region visibleContentOpaqueRegion() const OVERRIDE
{
if (m_overrideOpaqueContentsRect)
return intersection(m_opaqueContentsRect, visibleLayerRect());
using WebCore::TiledLayerChromium::numPaintedTiles;
using WebCore::TiledLayerChromium::idlePaintRect;
- virtual void setNeedsDisplayRect(const WebCore::FloatRect&);
+ virtual void setNeedsDisplayRect(const WebCore::FloatRect&) OVERRIDE;
const WebCore::FloatRect& lastNeedsDisplayRect() const { return m_lastNeedsDisplayRect; }
// Updates the visibleLayerRect().
- virtual void update(WebCore::CCTextureUpdater&, const WebCore::CCOcclusionTracker*);
+ virtual void update(WebCore::CCTextureUpdater&, const WebCore::CCOcclusionTracker*) OVERRIDE;
- virtual WebCore::TextureManager* textureManager() const { return m_textureManager; }
+ virtual WebCore::TextureManager* textureManager() const OVERRIDE { return m_textureManager; }
FakeLayerTextureUpdater* fakeLayerTextureUpdater() { return m_fakeTextureUpdater.get(); }
WebCore::FloatRect updateRect() { return m_updateRect; }
private:
- virtual WebCore::LayerTextureUpdater* textureUpdater() const { return m_fakeTextureUpdater.get(); }
- virtual void createTextureUpdaterIfNeeded() { }
+ virtual WebCore::LayerTextureUpdater* textureUpdater() const OVERRIDE { return m_fakeTextureUpdater.get(); }
+ virtual void createTextureUpdaterIfNeeded() OVERRIDE { }
RefPtr<FakeLayerTextureUpdater> m_fakeTextureUpdater;
WebCore::TextureManager* m_textureManager;
explicit FakeTiledLayerWithScaledBounds(WebCore::TextureManager*);
void setContentBounds(const WebCore::IntSize& contentBounds) { m_forcedContentBounds = contentBounds; }
- virtual WebCore::IntSize contentBounds() const { return m_forcedContentBounds; }
+ virtual WebCore::IntSize contentBounds() const OVERRIDE { return m_forcedContentBounds; }
protected:
WebCore::IntSize m_forcedContentBounds;
{
}
- virtual bool needsContentsScale() const
+ virtual bool needsContentsScale() const OVERRIDE
{
return true;
}
- virtual void setNeedsDisplayRect(const FloatRect& dirtyRect)
+ virtual void setNeedsDisplayRect(const FloatRect& dirtyRect) OVERRIDE
{
m_lastNeedsDisplayRect = dirtyRect;
LayerChromium::setNeedsDisplayRect(dirtyRect);
virtual ~MockLayerChromium() { }
- virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl()
+ virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl() OVERRIDE
{
return MockCCLayerImpl::create(m_layerId);
}
- virtual void pushPropertiesTo(CCLayerImpl* ccLayer)
+ virtual void pushPropertiesTo(CCLayerImpl* ccLayer) OVERRIDE
{
LayerChromium::pushPropertiesTo(ccLayer);