diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-20 04:12:41 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-20 04:12:41 +0000 |
commit | 1fea814130ff23de709fe242819d67b9d4344e07 (patch) | |
tree | 6b9f06266db7ea814bc597ffb7fea731fb77904e /cc/gl_renderer.h | |
parent | efd25e631eba64162229c4aee56413a4a0fd7549 (diff) | |
download | chromium_src-1fea814130ff23de709fe242819d67b9d4344e07.zip chromium_src-1fea814130ff23de709fe242819d67b9d4344e07.tar.gz chromium_src-1fea814130ff23de709fe242819d67b9d4344e07.tar.bz2 |
cc: Use ui/gfx geometry types for the CCRenderPass and CCDrawQuad classes.
We use these geometry types for CCDrawQuad types and in CCRenderPass, and so
we also make use of them in the CCRenderer classes.
A minor number of copies back to cc:: (WebCore) geometry types do occur in
the renderer implementations for now until we migrate the rest of the compositor.
Covered by existing tests.
BUG=152473
R=enne,jamesr
Review URL: https://chromiumcodereview.appspot.com/10984053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/gl_renderer.h')
-rw-r--r-- | cc/gl_renderer.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/cc/gl_renderer.h b/cc/gl_renderer.h index e6d1652..a255c9f 100644 --- a/cc/gl_renderer.h +++ b/cc/gl_renderer.h @@ -43,8 +43,6 @@ public: virtual void viewportChanged() OVERRIDE; - const FloatQuad& sharedGeometryQuad() const { return m_sharedGeometryQuad; } - // waits for rendering to finish virtual void finish() OVERRIDE; @@ -52,12 +50,7 @@ public: // puts backbuffer onscreen virtual bool swapBuffers() OVERRIDE; - static void debugGLCall(WebKit::WebGraphicsContext3D*, const char* command, const char* file, int line); - - const GeometryBinding* sharedGeometry() const { return m_sharedGeometry.get(); } - virtual void getFramebufferPixels(void *pixels, const IntRect&) OVERRIDE; - bool getFramebufferTexture(CCScopedTexture*, const IntRect& deviceRect); virtual bool isContextLost() OVERRIDE; @@ -66,15 +59,21 @@ public: protected: CCRendererGL(CCRendererClient*, CCResourceProvider*); + static void debugGLCall(WebKit::WebGraphicsContext3D*, const char* command, const char* file, int line); + bool isFramebufferDiscarded() const { return m_isFramebufferDiscarded; } bool initialize(); + const FloatQuad& sharedGeometryQuad() const { return m_sharedGeometryQuad; } + const GeometryBinding* sharedGeometry() const { return m_sharedGeometry.get(); } + + bool getFramebufferTexture(CCScopedTexture*, const IntRect& deviceRect); void releaseRenderPassTextures(); virtual void bindFramebufferToOutputSurface(DrawingFrame&) OVERRIDE; - virtual bool bindFramebufferToTexture(DrawingFrame&, const CCScopedTexture*, const IntRect& framebufferRect) OVERRIDE; - virtual void setDrawViewportSize(const IntSize&) OVERRIDE; - virtual void enableScissorTestRect(const IntRect& scissorRect) OVERRIDE; + virtual bool bindFramebufferToTexture(DrawingFrame&, const CCScopedTexture*, const gfx::Rect& framebufferRect) OVERRIDE; + virtual void setDrawViewportSize(const gfx::Size&) OVERRIDE; + virtual void enableScissorTestRect(const gfx::Rect& scissorRect) OVERRIDE; virtual void disableScissorTest() OVERRIDE; virtual void clearFramebuffer(DrawingFrame&) OVERRIDE; virtual void drawQuad(DrawingFrame&, const CCDrawQuad*) OVERRIDE; @@ -98,11 +97,11 @@ private: void setShaderOpacity(float opacity, int alphaLocation); void setShaderFloatQuad(const FloatQuad&, int quadLocation); - void drawQuadGeometry(const DrawingFrame&, const WebKit::WebTransformationMatrix& drawTransform, const FloatRect& quadRect, int matrixLocation); + void drawQuadGeometry(const DrawingFrame&, const WebKit::WebTransformationMatrix& drawTransform, const gfx::RectF& quadRect, int matrixLocation); - void copyTextureToFramebuffer(const DrawingFrame&, int textureId, const IntRect&, const WebKit::WebTransformationMatrix& drawMatrix); + void copyTextureToFramebuffer(const DrawingFrame&, int textureId, const gfx::Rect&, const WebKit::WebTransformationMatrix& drawMatrix); - bool useScopedTexture(DrawingFrame&, const CCScopedTexture*, const IntRect& viewportRect); + bool useScopedTexture(DrawingFrame&, const CCScopedTexture*, const gfx::Rect& viewportRect); bool makeContextCurrent(); @@ -204,7 +203,7 @@ private: WebKit::WebGraphicsContext3D* m_context; - IntRect m_swapBufferRect; + gfx::Rect m_swapBufferRect; bool m_isViewportChanged; bool m_isFramebufferDiscarded; bool m_discardFramebufferWhenNotVisible; |