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

Unified Diff: cc/draw_quad.h

Issue 12328098: cc: Moving anti-aliasing decision to parent compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@solidaa
Patch Set: Rebase to tip of tree 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 | « cc/delegated_renderer_layer_impl_unittest.cc ('k') | cc/draw_quad_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/draw_quad.h
diff --git a/cc/draw_quad.h b/cc/draw_quad.h
index df62c7b05bae5f0591746fe4de83aa2815a93b81..d6b9b40df150fba060627bf63622e89ef9b221ee 100644
--- a/cc/draw_quad.h
+++ b/cc/draw_quad.h
@@ -67,6 +67,7 @@ class CC_EXPORT DrawQuad {
const SharedQuadState* shared_quad_state;
bool IsDebugQuad() const { return material == DEBUG_BORDER; }
+
bool ShouldDrawWithBlending() const {
return needs_blending || shared_quad_state->opacity < 1.0f ||
!opaque_rect.Contains(visible_rect);
@@ -76,6 +77,32 @@ class CC_EXPORT DrawQuad {
ResourceProvider::ResourceId)> ResourceIteratorCallback;
virtual void IterateResources(const ResourceIteratorCallback& callback) = 0;
+ // Is the left edge of this tile aligned with the originating layer's
+ // left edge?
+ bool IsLeftEdge() const { return !rect.x(); }
+
+ // Is the top edge of this tile aligned with the originating layer's
+ // top edge?
+ bool IsTopEdge() const { return !rect.y(); }
+
+ // Is the right edge of this tile aligned with the originating layer's
+ // right edge?
+ bool IsRightEdge() const {
+ return rect.right() == shared_quad_state->content_bounds.width();
+ }
+
+ // Is the bottom edge of this tile aligned with the originating layer's
+ // bottom edge?
+ bool IsBottomEdge() const {
+ return rect.bottom() == shared_quad_state->content_bounds.height();
+ }
+
+ // Is any edge of this tile aligned with the originating layer's
+ // corresponding edge?
+ bool IsEdge() const {
+ return IsLeftEdge() || IsTopEdge() || IsRightEdge() || IsBottomEdge();
+ }
+
protected:
DrawQuad();
« no previous file with comments | « cc/delegated_renderer_layer_impl_unittest.cc ('k') | cc/draw_quad_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698