Chromium Code Reviews| 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/cc_export.h" | |
| 11 #include "cc/picture_pile_impl.h" | |
| 12 #include "cc/tile_draw_quad.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 TileDrawQuad { | |
|
danakj
2013/03/14 18:00:56
These are meant to be simple struct-like things fo
Leandro GraciĆ” Gil
2013/03/19 17:30:07
I'm trying enne's suggestion of a base class while
| |
| 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); | |
|
danakj
2013/03/14 18:00:56
What is the story for serializing these to the bro
| |
| 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 bool IsPictureQuad() const OVERRIDE; | |
| 51 | |
| 52 virtual void IterateResources(const ResourceIteratorCallback& callback) | |
| 53 OVERRIDE; | |
| 54 | |
| 55 static const PictureDrawQuad* MaterialCast(const DrawQuad*); | |
| 56 | |
| 57 private: | |
| 58 virtual DrawQuad::Material material() const OVERRIDE; | |
| 59 | |
| 60 PictureDrawQuad(); | |
| 61 }; | |
| 62 | |
| 63 } | |
| 64 | |
| 65 #endif // CC_PICTURE_DRAW_QUAD_H_ | |
| OLD | NEW |