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 CC_QUADS_TILE_DRAW_QUAD_H_ | 5 #ifndef CC_QUADS_TILE_DRAW_QUAD_H_ |
6 #define CC_QUADS_TILE_DRAW_QUAD_H_ | 6 #define CC_QUADS_TILE_DRAW_QUAD_H_ |
7 | 7 |
8 #include "cc/quads/content_draw_quad_base.h" | 8 #include "cc/quads/content_draw_quad_base.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase { | 12 class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase { |
13 public: | 13 public: |
14 static scoped_ptr<TileDrawQuad> Create(); | 14 TileDrawQuad(); |
15 virtual ~TileDrawQuad(); | 15 virtual ~TileDrawQuad(); |
16 | 16 |
17 void SetNew(const SharedQuadState* shared_quad_state, | 17 void SetNew(const SharedQuadState* shared_quad_state, |
18 const gfx::Rect& rect, | 18 const gfx::Rect& rect, |
19 const gfx::Rect& opaque_rect, | 19 const gfx::Rect& opaque_rect, |
20 const gfx::Rect& visible_rect, | 20 const gfx::Rect& visible_rect, |
21 unsigned resource_id, | 21 unsigned resource_id, |
22 const gfx::RectF& tex_coord_rect, | 22 const gfx::RectF& tex_coord_rect, |
23 const gfx::Size& texture_size, | 23 const gfx::Size& texture_size, |
24 bool swizzle_contents); | 24 bool swizzle_contents); |
25 | 25 |
26 void SetAll(const SharedQuadState* shared_quad_state, | 26 void SetAll(const SharedQuadState* shared_quad_state, |
27 const gfx::Rect& rect, | 27 const gfx::Rect& rect, |
28 const gfx::Rect& opaque_rect, | 28 const gfx::Rect& opaque_rect, |
29 const gfx::Rect& visible_rect, | 29 const gfx::Rect& visible_rect, |
30 bool needs_blending, | 30 bool needs_blending, |
31 unsigned resource_id, | 31 unsigned resource_id, |
32 const gfx::RectF& tex_coord_rect, | 32 const gfx::RectF& tex_coord_rect, |
33 const gfx::Size& texture_size, | 33 const gfx::Size& texture_size, |
34 bool swizzle_contents); | 34 bool swizzle_contents); |
35 | 35 |
36 unsigned resource_id; | 36 unsigned resource_id; |
37 | 37 |
38 virtual void IterateResources(const ResourceIteratorCallback& callback) | 38 virtual void IterateResources(const ResourceIteratorCallback& callback) |
39 OVERRIDE; | 39 OVERRIDE; |
40 | 40 |
41 static const TileDrawQuad* MaterialCast(const DrawQuad*); | 41 static const TileDrawQuad* MaterialCast(const DrawQuad*); |
42 | 42 |
43 private: | 43 private: |
44 TileDrawQuad(); | |
45 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; | 44 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; |
46 }; | 45 }; |
47 | 46 |
48 } // namespace cc | 47 } // namespace cc |
49 | 48 |
50 #endif // CC_QUADS_TILE_DRAW_QUAD_H_ | 49 #endif // CC_QUADS_TILE_DRAW_QUAD_H_ |
OLD | NEW |