OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_QUADS_PICTURE_DRAW_QUAD_H_ | |
6 #define CC_QUADS_PICTURE_DRAW_QUAD_H_ | |
7 | |
8 #include "base/memory/ref_counted.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "cc/base/cc_export.h" | |
11 #include "cc/quads/content_draw_quad_base.h" | |
12 #include "cc/resources/picture_pile_impl.h" | |
13 #include "ui/gfx/rect.h" | |
14 #include "ui/gfx/rect_f.h" | |
15 #include "ui/gfx/size.h" | |
16 | |
17 namespace cc { | |
18 | |
19 // Used for on-demand tile rasterization. | |
20 class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase { | |
21 public: | |
22 static scoped_ptr<PictureDrawQuad> Create(); | |
23 | |
24 void SetNew(const SharedQuadState* shared_quad_state, | |
25 gfx::Rect rect, | |
26 gfx::Rect opaque_rect, | |
27 const gfx::RectF& tex_coord_rect, | |
28 gfx::Size texture_size, | |
29 bool swizzle_contents, | |
30 gfx::Rect content_rect, | |
31 float contents_scale, | |
32 scoped_refptr<PicturePileImpl> picture_pile); | |
33 | |
34 void SetAll(const SharedQuadState* shared_quad_state, | |
35 gfx::Rect rect, | |
36 gfx::Rect opaque_rect, | |
37 gfx::Rect visible_rect, | |
38 bool needs_blending, | |
39 const gfx::RectF& tex_coord_rect, | |
40 gfx::Size texture_size, | |
41 bool swizzle_contents, | |
42 gfx::Rect content_rect, | |
43 float contents_scale, | |
44 scoped_refptr<PicturePileImpl> picture_pile); | |
45 | |
46 gfx::Rect content_rect; | |
47 float contents_scale; | |
48 scoped_refptr<PicturePileImpl> picture_pile; | |
49 | |
50 virtual void IterateResources(const ResourceIteratorCallback& callback) | |
51 OVERRIDE; | |
52 | |
53 static const PictureDrawQuad* MaterialCast(const DrawQuad*); | |
danakj
2013/03/22 18:02:41
this needs the same parameter name as in the .cc
Leandro Graciá Gil
2013/03/22 20:40:58
Done.
| |
54 | |
55 virtual ~PictureDrawQuad(); | |
danakj
2013/03/22 18:02:41
nit: move this just under Create()
Leandro Graciá Gil
2013/03/22 20:40:58
Done.
| |
56 | |
57 private: | |
58 PictureDrawQuad(); | |
59 }; | |
60 | |
61 } | |
62 | |
63 #endif // CC_QUADS_PICTURE_DRAW_QUAD_H_ | |
OLD | NEW |