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_PICTURE_DRAW_QUAD_H_ |
| 6 #define CC_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/tile_draw_quad.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 TileDrawQuadBase { |
| 21 public: |
| 22 static scoped_ptr<PictureDrawQuad> Create(); |
| 23 |
| 24 void SetNew(const SharedQuadState* shared_quad_state, |
| 25 const gfx::Rect& rect, |
| 26 const gfx::Rect& opaque_rect, |
| 27 const gfx::RectF& tex_coord_rect, |
| 28 const gfx::Size& texture_size, |
| 29 bool swizzle_contents, |
| 30 const gfx::Rect& content_rect, |
| 31 float contents_scale, |
| 32 scoped_refptr<PicturePileImpl> picture_pile); |
| 33 |
| 34 void SetAll(const SharedQuadState* shared_quad_state, |
| 35 const gfx::Rect& rect, |
| 36 const gfx::Rect& opaque_rect, |
| 37 const gfx::Rect& visible_rect, |
| 38 bool needs_blending, |
| 39 const gfx::RectF& tex_coord_rect, |
| 40 const gfx::Size& texture_size, |
| 41 bool swizzle_contents, |
| 42 const 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*); |
| 54 |
| 55 virtual ~PictureDrawQuad(); |
| 56 |
| 57 private: |
| 58 PictureDrawQuad(); |
| 59 }; |
| 60 |
| 61 } |
| 62 |
| 63 #endif // CC_PICTURE_DRAW_QUAD_H_ |
OLD | NEW |