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

Unified Diff: cc/quads/texture_draw_quad.cc

Issue 1142343008: cc: Rework overlays to not use the ResourceProvider and pass texture size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move overlay vars out of DrawQuad::Resources Created 5 years, 6 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/texture_draw_quad.cc
diff --git a/cc/quads/texture_draw_quad.cc b/cc/quads/texture_draw_quad.cc
index 7106af5e27b996e9e2fd8226fc56e3a4d2384f9b..0760d94668a152052bbe49db8e6f0153467c90a8 100644
--- a/cc/quads/texture_draw_quad.cc
+++ b/cc/quads/texture_draw_quad.cc
@@ -59,6 +59,8 @@ void TextureDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
const gfx::Rect& visible_rect,
bool needs_blending,
unsigned resource_id,
+ gfx::Size resource_size_in_pixels,
+ bool allow_overlay,
bool premultiplied_alpha,
const gfx::PointF& uv_top_left,
const gfx::PointF& uv_bottom_right,
@@ -69,6 +71,8 @@ void TextureDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
DrawQuad::SetAll(shared_quad_state, DrawQuad::TEXTURE_CONTENT, rect,
opaque_rect, visible_rect, needs_blending);
resources.ids[kResourceIdIndex] = resource_id;
+ overlay_resources.size_in_pixels[kResourceIdIndex] = resource_size_in_pixels;
+ overlay_resources.allow_overlay[kResourceIdIndex] = allow_overlay;
resources.count = 1;
this->premultiplied_alpha = premultiplied_alpha;
this->uv_top_left = uv_top_left;
@@ -105,4 +109,9 @@ void TextureDrawQuad::ExtendValue(base::trace_event::TracedValue* value) const {
value->SetBoolean("nearest_neighbor", nearest_neighbor);
}
+TextureDrawQuad::OverlayResources::OverlayResources() {
+ for (unsigned i = 0; i < Resources::kMaxResourceIdCount; i++)
+ allow_overlay[i] = false;
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698