OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "cc/quads/picture_draw_quad.h" | 5 #include "cc/quads/picture_draw_quad.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/resources/platform_color.h" | 9 #include "cc/resources/platform_color.h" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
12 | 12 |
13 PictureDrawQuad::PictureDrawQuad() { | 13 PictureDrawQuad::PictureDrawQuad() { |
14 } | 14 } |
15 | 15 |
16 PictureDrawQuad::~PictureDrawQuad() { | 16 PictureDrawQuad::~PictureDrawQuad() { |
17 } | 17 } |
18 | 18 |
19 scoped_ptr<PictureDrawQuad> PictureDrawQuad::Create() { | |
20 return make_scoped_ptr(new PictureDrawQuad); | |
21 } | |
22 | |
23 void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state, | 19 void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
24 const gfx::Rect& rect, | 20 const gfx::Rect& rect, |
25 const gfx::Rect& opaque_rect, | 21 const gfx::Rect& opaque_rect, |
26 const gfx::Rect& visible_rect, | 22 const gfx::Rect& visible_rect, |
27 const gfx::RectF& tex_coord_rect, | 23 const gfx::RectF& tex_coord_rect, |
28 const gfx::Size& texture_size, | 24 const gfx::Size& texture_size, |
29 ResourceFormat texture_format, | 25 ResourceFormat texture_format, |
30 const gfx::Rect& content_rect, | 26 const gfx::Rect& content_rect, |
31 float contents_scale, | 27 float contents_scale, |
32 scoped_refptr<PicturePileImpl> picture_pile) { | 28 scoped_refptr<PicturePileImpl> picture_pile) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 81 |
86 void PictureDrawQuad::ExtendValue(base::DictionaryValue* value) const { | 82 void PictureDrawQuad::ExtendValue(base::DictionaryValue* value) const { |
87 ContentDrawQuadBase::ExtendValue(value); | 83 ContentDrawQuadBase::ExtendValue(value); |
88 value->Set("content_rect", MathUtil::AsValue(content_rect).release()); | 84 value->Set("content_rect", MathUtil::AsValue(content_rect).release()); |
89 value->SetDouble("contents_scale", contents_scale); | 85 value->SetDouble("contents_scale", contents_scale); |
90 value->SetInteger("texture_format", texture_format); | 86 value->SetInteger("texture_format", texture_format); |
91 // TODO(piman): picture_pile? | 87 // TODO(piman): picture_pile? |
92 } | 88 } |
93 | 89 |
94 } // namespace cc | 90 } // namespace cc |
OLD | NEW |