| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CCTileDrawQuad_h | 5 // Temporary forwarding header |
| 6 #define CCTileDrawQuad_h | 6 #include "cc/tile_draw_quad.h" |
| 7 | |
| 8 #include "CCDrawQuad.h" | |
| 9 #include "GraphicsTypes3D.h" | |
| 10 #include "IntPoint.h" | |
| 11 #include "IntSize.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 | |
| 16 #pragma pack(push, 4) | |
| 17 | |
| 18 class CCTileDrawQuad : public CCDrawQuad { | |
| 19 public: | |
| 20 static scoped_ptr<CCTileDrawQuad> create(const CCSharedQuadState*, const Int
Rect& quadRect, const IntRect& opaqueRect, unsigned resourceId, const IntPoint&
textureOffset, const IntSize& textureSize, GC3Dint textureFilter, bool swizzleCo
ntents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA); | |
| 21 | |
| 22 unsigned resourceId() const { return m_resourceId; } | |
| 23 IntPoint textureOffset() const { return m_textureOffset; } | |
| 24 IntSize textureSize() const { return m_textureSize; } | |
| 25 GC3Dint textureFilter() const { return m_textureFilter; } | |
| 26 bool swizzleContents() const { return m_swizzleContents; } | |
| 27 | |
| 28 bool leftEdgeAA() const { return m_leftEdgeAA; } | |
| 29 bool topEdgeAA() const { return m_topEdgeAA; } | |
| 30 bool rightEdgeAA() const { return m_rightEdgeAA; } | |
| 31 bool bottomEdgeAA() const { return m_bottomEdgeAA; } | |
| 32 | |
| 33 bool isAntialiased() const { return leftEdgeAA() || topEdgeAA() || rightEdge
AA() || bottomEdgeAA(); } | |
| 34 | |
| 35 static const CCTileDrawQuad* materialCast(const CCDrawQuad*); | |
| 36 private: | |
| 37 CCTileDrawQuad(const CCSharedQuadState*, const IntRect& quadRect, const Int
Rect& opaqueRect, unsigned resourceId, const IntPoint& textureOffset, const IntS
ize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA,
bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA); | |
| 38 | |
| 39 unsigned m_resourceId; | |
| 40 IntPoint m_textureOffset; | |
| 41 IntSize m_textureSize; | |
| 42 GC3Dint m_textureFilter; | |
| 43 bool m_swizzleContents; | |
| 44 bool m_leftEdgeAA; | |
| 45 bool m_topEdgeAA; | |
| 46 bool m_rightEdgeAA; | |
| 47 bool m_bottomEdgeAA; | |
| 48 }; | |
| 49 | |
| 50 #pragma pack(pop) | |
| 51 | |
| 52 } | |
| 53 | |
| 54 #endif | |
| OLD | NEW |