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

Unified Diff: cc/gl_renderer.h

Issue 12393053: Re-land: cc: Added antialiasing support for solid color layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setupQuadForAntialiasing modifies localQuad only if useAA is true Created 7 years, 10 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 | « no previous file | cc/gl_renderer.cc » ('j') | cc/gl_renderer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/gl_renderer.h
diff --git a/cc/gl_renderer.h b/cc/gl_renderer.h
index 4fe0c48b52e0ce27d3dcecdb5ff59207ec4f1a32..a5419d7230e55116b8f9ee64631ec3c6362408c8 100644
--- a/cc/gl_renderer.h
+++ b/cc/gl_renderer.h
@@ -117,6 +117,12 @@ private:
void copyTextureToFramebuffer(const DrawingFrame&, int textureId, const gfx::Rect&, const gfx::Transform& drawMatrix);
+ // Check if quad needs antialiasing and if so, inflate the quad and fill edge array for fragment shader.
+ // localQuad is set to inflated quad if antialiasing is required, otherwise it is left unchanged.
+ // edge array is filled with inflated quad's edge data if antialiasing is required, otherwise it is left unchanged.
+ // Returns true if quad requires antialiasing and false otherwise.
+ bool setupQuadForAntialiasing(const gfx::Transform& deviceTransform, const DrawQuad* quad, gfx::QuadF* localQuad, float* edge) const;
enne (OOO) 2013/03/04 22:44:59 Can you make this parameter float edge[24] here ra
ernstm 2013/03/05 00:46:51 Done.
+
bool useScopedTexture(DrawingFrame&, const ScopedResource*, const gfx::Rect& viewportRect);
bool makeContextCurrent();
@@ -170,7 +176,8 @@ private:
typedef ProgramBinding<VertexShaderPosTexYUVStretch, FragmentShaderYUVVideo> VideoYUVProgram;
// Special purpose / effects shaders.
- typedef ProgramBinding<VertexShaderPos, FragmentShaderColor> SolidColorProgram;
+ typedef ProgramBinding<VertexShaderQuad, FragmentShaderColor> SolidColorProgram;
+ typedef ProgramBinding<VertexShaderQuad, FragmentShaderColorAA> SolidColorProgramAA;
const TileProgram* tileProgram();
const TileProgramOpaque* tileProgramOpaque();
@@ -193,6 +200,7 @@ private:
const VideoStreamTextureProgram* videoStreamTextureProgram();
const SolidColorProgram* solidColorProgram();
+ const SolidColorProgramAA* solidColorProgramAA();
scoped_ptr<TileProgram> m_tileProgram;
scoped_ptr<TileProgramOpaque> m_tileProgramOpaque;
@@ -215,6 +223,7 @@ private:
scoped_ptr<VideoStreamTextureProgram> m_videoStreamTextureProgram;
scoped_ptr<SolidColorProgram> m_solidColorProgram;
+ scoped_ptr<SolidColorProgramAA> m_solidColorProgramAA;
OutputSurface* m_outputSurface;
WebKit::WebGraphicsContext3D* m_context;
« no previous file with comments | « no previous file | cc/gl_renderer.cc » ('j') | cc/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698