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

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: Changed formatting in GLRenderer to Chrome style. Created 7 years, 9 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 7b1f8f489e658237a1cce1751fe6691a56006081..0018c7517c1171db854295808268cf232839b9f5 100644
--- a/cc/gl_renderer.h
+++ b/cc/gl_renderer.h
@@ -152,6 +152,16 @@ class CC_EXPORT GLRenderer :
gfx::Rect rect,
const gfx::Transform& draw_matrix);
+ // 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,
danakj 2013/03/14 00:54:25 1 param per line if they don't all fit on a single
ernstm 2013/03/14 17:08:33 Done.
+ float edge[24]) const;
+
bool UseScopedTexture(DrawingFrame& frame,
const ScopedResource* resource,
gfx::Rect viewport_rect);
@@ -232,8 +242,10 @@ class CC_EXPORT GLRenderer :
VideoYUVProgram;
// Special purpose / effects shaders.
- typedef ProgramBinding<VertexShaderPos, FragmentShaderColor>
+ typedef ProgramBinding<VertexShaderQuad, FragmentShaderColor>
SolidColorProgram;
+ typedef ProgramBinding<VertexShaderQuad, FragmentShaderColorAA>
+ SolidColorProgramAA;
const TileProgram* GetTileProgram();
const TileProgramOpaque* GetTileProgramOpaque();
@@ -256,6 +268,7 @@ class CC_EXPORT GLRenderer :
const VideoStreamTextureProgram* GetVideoStreamTextureProgram();
const SolidColorProgram* GetSolidColorProgram();
+ const SolidColorProgramAA* GetSolidColorProgramAA();
scoped_ptr<TileProgram> tile_program_;
scoped_ptr<TileProgramOpaque> tile_program_opaque_;
@@ -278,6 +291,7 @@ class CC_EXPORT GLRenderer :
scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_;
scoped_ptr<SolidColorProgram> solid_color_program_;
+ scoped_ptr<SolidColorProgramAA> solid_color_program_aa_;
OutputSurface* output_surface_;
WebKit::WebGraphicsContext3D* 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