OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 25 matching lines...) Expand all Loading... |
36 class CCSharedQuadState { | 36 class CCSharedQuadState { |
37 WTF_MAKE_NONCOPYABLE(CCSharedQuadState); | 37 WTF_MAKE_NONCOPYABLE(CCSharedQuadState); |
38 public: | 38 public: |
39 static PassOwnPtr<CCSharedQuadState> create(const TransformationMatrix& quad
Transform, const TransformationMatrix& layerTransform, const IntRect& layerRect,
const IntRect& clipRect, float opacity, bool opaque); | 39 static PassOwnPtr<CCSharedQuadState> create(const TransformationMatrix& quad
Transform, const TransformationMatrix& layerTransform, const IntRect& layerRect,
const IntRect& clipRect, float opacity, bool opaque); |
40 | 40 |
41 // The transform that quads in a CCDrawQuad should be transformed with. | 41 // The transform that quads in a CCDrawQuad should be transformed with. |
42 const TransformationMatrix& quadTransform() const { return m_quadTransform;
} | 42 const TransformationMatrix& quadTransform() const { return m_quadTransform;
} |
43 // The transform that layerRect() should be transformed with. | 43 // The transform that layerRect() should be transformed with. |
44 const TransformationMatrix& layerTransform() const { return m_layerTransform
; } | 44 const TransformationMatrix& layerTransform() const { return m_layerTransform
; } |
45 const IntRect& layerRect() const { return m_layerRect; } | 45 const IntRect& layerRect() const { return m_layerRect; } |
| 46 // Usage: if clipRect is empty, this clipRect should not be used. |
46 const IntRect& clipRect() const { return m_clipRect; } | 47 const IntRect& clipRect() const { return m_clipRect; } |
47 | 48 |
48 float opacity() const { return m_opacity; } | 49 float opacity() const { return m_opacity; } |
49 bool isOpaque() const { return m_opaque; } | 50 bool isOpaque() const { return m_opaque; } |
50 bool isLayerAxisAlignedIntRect() const; | 51 bool isLayerAxisAlignedIntRect() const; |
51 | 52 |
52 private: | 53 private: |
53 CCSharedQuadState(const TransformationMatrix& quadTransform, const Transform
ationMatrix& layerTransform, const IntRect& layerRect, const IntRect& clipRect,
float opacity, bool opaque); | 54 CCSharedQuadState(const TransformationMatrix& quadTransform, const Transform
ationMatrix& layerTransform, const IntRect& layerRect, const IntRect& clipRect,
float opacity, bool opaque); |
54 | 55 |
55 TransformationMatrix m_quadTransform; | 56 TransformationMatrix m_quadTransform; |
56 TransformationMatrix m_layerTransform; | 57 TransformationMatrix m_layerTransform; |
57 IntRect m_layerRect; | 58 IntRect m_layerRect; |
58 IntRect m_clipRect; | 59 IntRect m_clipRect; |
59 float m_opacity; | 60 float m_opacity; |
60 bool m_opaque; | 61 bool m_opaque; |
61 }; | 62 }; |
62 | 63 |
63 } | 64 } |
64 | 65 |
65 #endif | 66 #endif |
OLD | NEW |