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

Unified Diff: cc/texture_draw_quad.h

Issue 11411050: cc: Make the DrawQuad subclasses into struct-like classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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/test/render_pass_test_common.cc ('k') | cc/texture_draw_quad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_draw_quad.h
diff --git a/cc/texture_draw_quad.h b/cc/texture_draw_quad.h
index 5a6d3f39778a41dcc3b385bdf3f5ce7288af7e25..177febf640243aa01c34e069b368e876dc883783 100644
--- a/cc/texture_draw_quad.h
+++ b/cc/texture_draw_quad.h
@@ -13,22 +13,35 @@
namespace cc {
class CC_EXPORT TextureDrawQuad : public DrawQuad {
-public:
- static scoped_ptr<TextureDrawQuad> create(const SharedQuadState*, const gfx::Rect&, const gfx::Rect& opaqueRect, unsigned resourceId, bool premultipliedAlpha, const gfx::RectF& uvRect, bool flipped);
- gfx::RectF uvRect() const { return m_uvRect; }
-
- unsigned resourceId() const { return m_resourceId; }
- bool premultipliedAlpha() const { return m_premultipliedAlpha; }
- bool flipped() const { return m_flipped; }
-
- static const TextureDrawQuad* materialCast(const DrawQuad*);
-private:
- TextureDrawQuad(const SharedQuadState*, const gfx::Rect&, const gfx::Rect& opaqueRect, unsigned resourceId, bool premultipliedAlpha, const gfx::RectF& uvRect, bool flipped);
-
- unsigned m_resourceId;
- bool m_premultipliedAlpha;
- gfx::RectF m_uvRect;
- bool m_flipped;
+ public:
+ static scoped_ptr<TextureDrawQuad> Create();
+
+ void SetNew(const SharedQuadState* shared_quad_state,
+ gfx::Rect rect,
+ gfx::Rect opaque_rect,
+ unsigned resource_id,
+ bool premultiplied_alpha,
+ const gfx::RectF& uv_rect,
+ bool flipped);
+
+ void SetAll(const SharedQuadState* shared_quad_state,
+ gfx::Rect rect,
+ gfx::Rect opaque_rect,
+ gfx::Rect visible_rect,
+ bool needs_blending,
+ unsigned resource_id,
+ bool premultiplied_alpha,
+ const gfx::RectF& uv_rect,
+ bool flipped);
+
+ unsigned resource_id;
+ bool premultiplied_alpha;
+ gfx::RectF uv_rect;
+ bool flipped;
+
+ static const TextureDrawQuad* MaterialCast(const DrawQuad*);
+ private:
+ TextureDrawQuad();
};
}
« no previous file with comments | « cc/test/render_pass_test_common.cc ('k') | cc/texture_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698