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 #include "cc/quads/picture_draw_quad.h" | |
| 6 | |
| 7 namespace cc { | |
| 8 | |
| 9 PictureDrawQuad::PictureDrawQuad() { | |
| 10 } | |
| 11 | |
| 12 PictureDrawQuad::~PictureDrawQuad() { | |
| 13 } | |
| 14 | |
| 15 scoped_ptr<PictureDrawQuad> PictureDrawQuad::Create() { | |
| 16 return make_scoped_ptr(new PictureDrawQuad); | |
| 17 } | |
| 18 | |
| 19 void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state, | |
| 20 const gfx::Rect& rect, | |
|
danakj
2013/03/21 02:34:42
pass gfx::Rect and gfx::Size by value like the oth
Leandro Graciá Gil
2013/03/21 03:35:50
These are ultimately assigned to gfx::Rect and gfx
danakj
2013/03/21 04:33:39
We currently follow a style throught cc/ to pass g
Leandro Graciá Gil
2013/03/21 12:27:25
That's useful under the assumption of working in 6
| |
| 21 const gfx::Rect& opaque_rect, | |
| 22 const gfx::RectF& tex_coord_rect, | |
| 23 const gfx::Size& texture_size, | |
| 24 bool swizzle_contents, | |
| 25 const gfx::Rect& content_rect, | |
| 26 float contents_scale, | |
| 27 scoped_refptr<PicturePileImpl> picture_pile) { | |
| 28 TileDrawQuadBase::SetNew(shared_quad_state, DrawQuad::PICTURE_CONTENT, rect, | |
| 29 opaque_rect, tex_coord_rect, texture_size, | |
| 30 swizzle_contents); | |
| 31 this->content_rect = content_rect; | |
| 32 this->contents_scale = contents_scale; | |
| 33 this->picture_pile = picture_pile; | |
| 34 } | |
| 35 | |
| 36 void PictureDrawQuad::SetAll(const SharedQuadState* shared_quad_state, | |
| 37 const gfx::Rect& rect, | |
| 38 const gfx::Rect& opaque_rect, | |
| 39 const gfx::Rect& visible_rect, | |
| 40 bool needs_blending, | |
| 41 const gfx::RectF& tex_coord_rect, | |
| 42 const gfx::Size& texture_size, | |
| 43 bool swizzle_contents, | |
| 44 const gfx::Rect& content_rect, | |
| 45 float contents_scale, | |
| 46 scoped_refptr<PicturePileImpl> picture_pile) { | |
| 47 TileDrawQuadBase::SetAll(shared_quad_state, DrawQuad::PICTURE_CONTENT, rect, | |
| 48 opaque_rect, visible_rect, needs_blending, | |
| 49 tex_coord_rect, texture_size, swizzle_contents); | |
| 50 this->content_rect = content_rect; | |
| 51 this->contents_scale = contents_scale; | |
| 52 this->picture_pile = picture_pile; | |
| 53 } | |
| 54 | |
| 55 void PictureDrawQuad::IterateResources( | |
| 56 const ResourceIteratorCallback& callback) { | |
| 57 } | |
|
danakj
2013/03/21 02:34:42
// TODO(danakj): Convert to TextureDrawQuad?
NOT
Leandro Graciá Gil
2013/03/21 03:35:50
I'll assume you want me to add that to IterateReso
danakj
2013/03/21 04:33:39
Yes please.
Leandro Graciá Gil
2013/03/21 16:42:48
Done.
| |
| 58 | |
| 59 const PictureDrawQuad* PictureDrawQuad::MaterialCast(const DrawQuad* quad) { | |
| 60 DCHECK(quad->material == DrawQuad::PICTURE_CONTENT); | |
| 61 return static_cast<const PictureDrawQuad*>(quad); | |
| 62 } | |
| 63 | |
| 64 } // namespace cc | |
| OLD | NEW |