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

Unified Diff: cc/solid_color_draw_quad.h

Issue 11649005: cc: Support anti-aliasing for solid color layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: per edge anti-aliasing Created 8 years 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 | « cc/software_renderer_unittest.cc ('k') | cc/solid_color_draw_quad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/solid_color_draw_quad.h
diff --git a/cc/solid_color_draw_quad.h b/cc/solid_color_draw_quad.h
index c8dd0c01d17501160b389ccbd8734707ef4e8935..9a9891f05f036139599722451869a6466460f6fa 100644
--- a/cc/solid_color_draw_quad.h
+++ b/cc/solid_color_draw_quad.h
@@ -18,17 +18,36 @@ class CC_EXPORT SolidColorDrawQuad : public DrawQuad {
void SetNew(const SharedQuadState* shared_quad_state,
gfx::Rect rect,
- SkColor color);
+ SkColor color,
+ bool left_edge_aa,
+ bool top_edge_aa,
+ bool right_edge_aa,
+ bool bottom_edge_aa);
void SetAll(const SharedQuadState* shared_quad_state,
gfx::Rect rect,
gfx::Rect opaque_rect,
gfx::Rect visible_rect,
bool needs_blending,
- SkColor color);
+ SkColor color,
+ bool left_edge_aa,
+ bool top_edge_aa,
+ bool right_edge_aa,
+ bool bottom_edge_aa);
SkColor color;
+ // TODO(danakj): Stick the data used to compute these things in the quad
danakj 2012/12/21 20:50:18 Maybe we can address this TODO at the same time?
reveman 2012/12/21 20:58:05 hm, not sure I understand. isn't the shared state
danakj 2012/12/21 22:18:58 Ah, yes. I guess we need some piece of data on eac
reveman 2012/12/21 23:33:46 the only piece of data shared between tiles is: bo
+ // instead so the parent compositor can decide to use AA on its own.
+ bool left_edge_aa;
+ bool top_edge_aa;
+ bool right_edge_aa;
+ bool bottom_edge_aa;
+
+ bool IsAntialiased() const {
+ return left_edge_aa || top_edge_aa || right_edge_aa || bottom_edge_aa;
+ }
+
static const SolidColorDrawQuad* MaterialCast(const DrawQuad*);
private:
SolidColorDrawQuad();
« no previous file with comments | « cc/software_renderer_unittest.cc ('k') | cc/solid_color_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698