| 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/content_draw_quad_base.h" | 5 #include "cc/quads/content_draw_quad_base.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/values.h" |
| 9 #include "cc/base/math_util.h" |
| 8 | 10 |
| 9 namespace cc { | 11 namespace cc { |
| 10 | 12 |
| 11 ContentDrawQuadBase::ContentDrawQuadBase() | 13 ContentDrawQuadBase::ContentDrawQuadBase() |
| 12 : swizzle_contents(false) { | 14 : swizzle_contents(false) { |
| 13 } | 15 } |
| 14 | 16 |
| 15 ContentDrawQuadBase::~ContentDrawQuadBase() { | 17 ContentDrawQuadBase::~ContentDrawQuadBase() { |
| 16 } | 18 } |
| 17 | 19 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 40 const gfx::RectF& tex_coord_rect, | 42 const gfx::RectF& tex_coord_rect, |
| 41 gfx::Size texture_size, | 43 gfx::Size texture_size, |
| 42 bool swizzle_contents) { | 44 bool swizzle_contents) { |
| 43 DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect, | 45 DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect, |
| 44 visible_rect, needs_blending); | 46 visible_rect, needs_blending); |
| 45 this->tex_coord_rect = tex_coord_rect; | 47 this->tex_coord_rect = tex_coord_rect; |
| 46 this->texture_size = texture_size; | 48 this->texture_size = texture_size; |
| 47 this->swizzle_contents = swizzle_contents; | 49 this->swizzle_contents = swizzle_contents; |
| 48 } | 50 } |
| 49 | 51 |
| 52 void ContentDrawQuadBase::ExtendValue(base::DictionaryValue* value) const { |
| 53 value->Set("tex_coord_rect", MathUtil::AsValue(tex_coord_rect).release()); |
| 54 value->Set("texture_size", MathUtil::AsValue(texture_size).release()); |
| 55 value->SetBoolean("swizzle_contents", swizzle_contents); |
| 56 } |
| 57 |
| 50 } // namespace cc | 58 } // namespace cc |
| OLD | NEW |