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

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: More indentation fixes 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 | « 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/draw_quad.h
diff --git a/cc/draw_quad.h b/cc/draw_quad.h
index dc87a5d96a0d2ffe4a55b3819ca5f4db5733d058..81af70a774aa6ce1e0565eb77f6b297a7602e597 100644
--- a/cc/draw_quad.h
+++ b/cc/draw_quad.h
@@ -66,11 +66,38 @@ 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);
}
+ // Is the left edge of this tile aligned with the originating layer's
reveman 2013/02/26 01:49:28 nit: remove whitespace at end of line.
ernstm 2013/02/26 18:10:57 Done.
+ // left edge?
+ bool IsLeftEdge() const { return !rect.x(); }
+
+ // Is the top edge of this tile aligned with the originating layer's
reveman 2013/02/26 01:49:28 nit: remove whitespace at end of line.
ernstm 2013/02/26 18:10:57 Done.
+ // top edge?
+ bool IsTopEdge() const { return !rect.y(); }
+
+ // Is the right edge of this tile aligned with the originating layer's
reveman 2013/02/26 01:49:28 nit: remove whitespace at end of line.
ernstm 2013/02/26 18:10:57 Done.
+ // 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
reveman 2013/02/26 01:49:28 nit: remove whitespace at end of line.
ernstm 2013/02/26 18:10:57 Done.
+ // 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
reveman 2013/02/26 01:49:28 nit: remove whitespace at end of line.
ernstm 2013/02/26 18:10:57 Done.
+ // corresponding edge?
+ bool IsEdge() const {
reveman 2013/02/26 01:49:28 nit: remove whitespace at end of line.
ernstm 2013/02/26 18:10:57 Done.
ernstm 2013/02/26 18:10:57 Done.
+ return IsLeftEdge() || IsTopEdge() || IsRightEdge() || IsBottomEdge();
reveman 2013/02/26 01:49:28 nit: remove whitespace at end of line.
ernstm 2013/02/26 18:10:57 Done.
ernstm 2013/02/26 18:10:57 Done.
+ }
+
virtual void AppendResources(ResourceProvider::ResourceIdArray* resources);
protected:
« 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