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

Unified Diff: cc/quads/content_draw_quad_base.cc

Issue 1380653003: Mac Overlays: Allow SolidColor and Tile quads to be candidates for overlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@AllOrNothing2
Patch Set: Plumb allow_overlay Created 5 years, 2 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
Index: cc/quads/content_draw_quad_base.cc
diff --git a/cc/quads/content_draw_quad_base.cc b/cc/quads/content_draw_quad_base.cc
index 66fa147beea8be3582e83551b815f9a6d19908ee..b53ad3b24c726407e3198e51a08d8ceefbd50f27 100644
--- a/cc/quads/content_draw_quad_base.cc
+++ b/cc/quads/content_draw_quad_base.cc
@@ -12,7 +12,7 @@
namespace cc {
ContentDrawQuadBase::ContentDrawQuadBase()
- : swizzle_contents(false) {
+ : swizzle_contents(false), nearest_neighbor(false), allow_overlay(false) {
}
ContentDrawQuadBase::~ContentDrawQuadBase() {
@@ -26,7 +26,8 @@ void ContentDrawQuadBase::SetNew(const SharedQuadState* shared_quad_state,
const gfx::RectF& tex_coord_rect,
const gfx::Size& texture_size,
bool swizzle_contents,
- bool nearest_neighbor) {
+ bool nearest_neighbor,
+ bool allow_overlay) {
bool needs_blending = false;
DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect,
visible_rect, needs_blending);
@@ -34,6 +35,7 @@ void ContentDrawQuadBase::SetNew(const SharedQuadState* shared_quad_state,
this->texture_size = texture_size;
this->swizzle_contents = swizzle_contents;
this->nearest_neighbor = nearest_neighbor;
+ this->allow_overlay = allow_overlay;
}
void ContentDrawQuadBase::SetAll(const SharedQuadState* shared_quad_state,
@@ -45,13 +47,15 @@ void ContentDrawQuadBase::SetAll(const SharedQuadState* shared_quad_state,
const gfx::RectF& tex_coord_rect,
const gfx::Size& texture_size,
bool swizzle_contents,
- bool nearest_neighbor) {
+ bool nearest_neighbor,
+ bool allow_overlay) {
DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect,
visible_rect, needs_blending);
this->tex_coord_rect = tex_coord_rect;
this->texture_size = texture_size;
this->swizzle_contents = swizzle_contents;
this->nearest_neighbor = nearest_neighbor;
+ this->allow_overlay = allow_overlay;
}
void ContentDrawQuadBase::ExtendValue(
@@ -61,6 +65,7 @@ void ContentDrawQuadBase::ExtendValue(
value->SetBoolean("swizzle_contents", swizzle_contents);
value->SetBoolean("nearest_neighbor", nearest_neighbor);
+ value->SetBoolean("allow_overlay", allow_overlay);
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698