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

Unified Diff: cc/shared_quad_state.h

Issue 11416088: cc: Turn SharedQuadState into a struct-like class similar to DrawQuads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix debug build 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/render_surface_unittest.cc ('k') | cc/shared_quad_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/shared_quad_state.h
diff --git a/cc/shared_quad_state.h b/cc/shared_quad_state.h
index 743d671c1e44da3cb493c63099b619d0dd9ad0c7..350e80bddb6830349dd6a38a2083029f9cdfa17b 100644
--- a/cc/shared_quad_state.h
+++ b/cc/shared_quad_state.h
@@ -12,20 +12,26 @@
namespace cc {
-struct CC_EXPORT SharedQuadState {
- int id;
-
- // Transforms from quad's original content space to its target content space.
- WebKit::WebTransformationMatrix quadTransform;
- // This rect lives in the content space for the quad's originating layer.
- gfx::Rect visibleContentRect;
- gfx::Rect clippedRectInTarget;
- float opacity;
-
- static scoped_ptr<SharedQuadState> create(const WebKit::WebTransformationMatrix& quadTransform, const gfx::Rect& visibleContentRect, const gfx::Rect& clippedRectInTarget, float opacity);
- SharedQuadState(const WebKit::WebTransformationMatrix& quadTransform, const gfx::Rect& visibleContentRect, const gfx::Rect& clippedRectInTarget, float opacity);
-
- scoped_ptr<SharedQuadState> copy() const;
+class CC_EXPORT SharedQuadState {
+ public:
+ static scoped_ptr<SharedQuadState> Create();
+
+ scoped_ptr<SharedQuadState> Copy() const;
+
+ void SetAll(const WebKit::WebTransformationMatrix& content_to_target_transform,
+ const gfx::Rect& visible_content_rect,
+ const gfx::Rect& clipped_rect_in_target,
+ float opacity);
+
+ // Transforms from quad's original content space to its target content space.
+ WebKit::WebTransformationMatrix content_to_target_transform;
+ // This rect lives in the content space for the quad's originating layer.
+ gfx::Rect visible_content_rect;
+ gfx::Rect clipped_rect_in_target;
+ float opacity;
+
+ private:
+ SharedQuadState();
};
}
« no previous file with comments | « cc/render_surface_unittest.cc ('k') | cc/shared_quad_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698