Index: cc/draw_quad.h |
diff --git a/cc/draw_quad.h b/cc/draw_quad.h |
index c1982c17d5aa8f200893f477c52b9d707386bcba..4853b7b8a0be175cfdfca7e40f0202c2e5c1a1f0 100644 |
--- a/cc/draw_quad.h |
+++ b/cc/draw_quad.h |
@@ -28,6 +28,26 @@ class CC_EXPORT DrawQuad { |
YUV_VIDEO_CONTENT, |
STREAM_VIDEO_CONTENT, |
}; |
+ struct AntiAliasing { |
danakj
2013/01/08 22:30:46
Should this instead be "Layer Edgeness" or somethi
reveman
2013/01/09 14:20:05
Yea, this is not the full anti-aliasing decision.
|
+ AntiAliasing() : |
+ left_edge(false), |
+ top_edge(false), |
+ right_edge(false), |
+ bottom_edge(false) {} |
+ AntiAliasing(bool left_edge, |
danakj
2013/01/08 22:34:16
I'm also wondering what is the benefit of this str
reveman
2013/01/09 14:20:05
Maybe. The default constructor is somewhat useful
|
+ bool top_edge, |
+ bool right_edge, |
+ bool bottom_edge) : |
+ left_edge(left_edge), |
+ top_edge(top_edge), |
+ right_edge(right_edge), |
+ bottom_edge(bottom_edge) {} |
+ |
+ bool left_edge; |
+ bool top_edge; |
+ bool right_edge; |
+ bool bottom_edge; |
+ }; |
virtual ~DrawQuad(); |
@@ -60,6 +80,10 @@ class CC_EXPORT DrawQuad { |
// opaque area. |
bool needs_blending; |
+ // By default anti-aliasing is not used. With this setting, it is possible |
+ // to enable anti-aliasing for specific edges. |
+ AntiAliasing anti_aliasing; |
+ |
// Stores state common to a large bundle of quads; kept separate for memory |
// efficiency. There is special treatment to reconstruct these pointers |
// during serialization. |
@@ -70,6 +94,13 @@ class CC_EXPORT DrawQuad { |
return needs_blending || shared_quad_state->opacity < 1.0f || |
!opaque_rect.Contains(visible_rect); |
} |
+ bool IsAntialiased() const { |
+ return |
+ anti_aliasing.left_edge || |
+ anti_aliasing.top_edge || |
+ anti_aliasing.right_edge || |
+ anti_aliasing.bottom_edge; |
+ } |
protected: |
DrawQuad(); |
@@ -79,7 +110,8 @@ class CC_EXPORT DrawQuad { |
gfx::Rect rect, |
gfx::Rect opaque_rect, |
gfx::Rect visible_rect, |
- bool needs_blending); |
+ bool needs_blending, |
+ AntiAliasing anti_aliasing); |
}; |
} |