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

Unified Diff: cc/quads/yuv_video_draw_quad.h

Issue 1152473006: cc: Remove DrawQuad::IterateResoruces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/yuv_video_draw_quad.h
diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h
index deeca2c1cbce07d9b764d52f48c1001e01b7b778..53ef5710d2000a518cc4a679b3a93f7498f8644a 100644
--- a/cc/quads/yuv_video_draw_quad.h
+++ b/cc/quads/yuv_video_draw_quad.h
@@ -64,17 +64,29 @@ class CC_EXPORT YUVVideoDrawQuad : public DrawQuad {
gfx::RectF uv_tex_coord_rect;
gfx::Size ya_tex_size;
gfx::Size uv_tex_size;
- unsigned y_plane_resource_id;
- unsigned u_plane_resource_id;
- unsigned v_plane_resource_id;
- unsigned a_plane_resource_id;
ColorSpace color_space;
- void IterateResources(const ResourceIteratorCallback& callback) override;
-
static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*);
+ ResourceId y_plane_resource_id() const {
+ return resources.ids[kYPlaneResourceIdIndex];
+ }
+ ResourceId u_plane_resource_id() const {
+ return resources.ids[kUPlaneResourceIdIndex];
+ }
+ ResourceId v_plane_resource_id() const {
+ return resources.ids[kVPlaneResourceIdIndex];
+ }
+ ResourceId a_plane_resource_id() const {
+ return resources.ids[kAPlaneResourceIdIndex];
+ }
+
private:
+ static const size_t kYPlaneResourceIdIndex = 0;
+ static const size_t kUPlaneResourceIdIndex = 1;
+ static const size_t kVPlaneResourceIdIndex = 2;
+ static const size_t kAPlaneResourceIdIndex = 3;
+
void ExtendValue(base::trace_event::TracedValue* value) const override;
};

Powered by Google App Engine
This is Rietveld 408576698