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

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: More Chrome style formatting changes. 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') | no next file with comments »
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..ebc018c29e555ed0bb75919e0d1edd73a660cd72 100644
--- a/cc/gl_renderer.h
+++ b/cc/gl_renderer.h
@@ -152,6 +152,17 @@ 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,
+ float edge[24]) const;
+
bool UseScopedTexture(DrawingFrame& frame,
const ScopedResource* resource,
gfx::Rect viewport_rect);
@@ -232,8 +243,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 +269,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 +292,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698