| 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/debug/trace_event_argument.h" | |
| 8 #include "base/values.h" | 7 #include "base/values.h" |
| 9 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
| 10 #include "cc/resources/platform_color.h" | 9 #include "cc/resources/platform_color.h" |
| 11 | 10 |
| 12 namespace cc { | 11 namespace cc { |
| 13 | 12 |
| 14 PictureDrawQuad::PictureDrawQuad() { | 13 PictureDrawQuad::PictureDrawQuad() { |
| 15 } | 14 } |
| 16 | 15 |
| 17 PictureDrawQuad::~PictureDrawQuad() { | 16 PictureDrawQuad::~PictureDrawQuad() { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const ResourceIteratorCallback& callback) { | 72 const ResourceIteratorCallback& callback) { |
| 74 // TODO(danakj): Convert to TextureDrawQuad? | 73 // TODO(danakj): Convert to TextureDrawQuad? |
| 75 NOTIMPLEMENTED(); | 74 NOTIMPLEMENTED(); |
| 76 } | 75 } |
| 77 | 76 |
| 78 const PictureDrawQuad* PictureDrawQuad::MaterialCast(const DrawQuad* quad) { | 77 const PictureDrawQuad* PictureDrawQuad::MaterialCast(const DrawQuad* quad) { |
| 79 DCHECK(quad->material == DrawQuad::PICTURE_CONTENT); | 78 DCHECK(quad->material == DrawQuad::PICTURE_CONTENT); |
| 80 return static_cast<const PictureDrawQuad*>(quad); | 79 return static_cast<const PictureDrawQuad*>(quad); |
| 81 } | 80 } |
| 82 | 81 |
| 83 void PictureDrawQuad::ExtendValue(base::debug::TracedValue* value) const { | 82 void PictureDrawQuad::ExtendValue(base::DictionaryValue* value) const { |
| 84 ContentDrawQuadBase::ExtendValue(value); | 83 ContentDrawQuadBase::ExtendValue(value); |
| 85 value->BeginArray("content_rect"); | 84 value->Set("content_rect", MathUtil::AsValue(content_rect).release()); |
| 86 MathUtil::AddToTracedValue(content_rect, value); | |
| 87 value->EndArray(); | |
| 88 value->SetDouble("contents_scale", contents_scale); | 85 value->SetDouble("contents_scale", contents_scale); |
| 89 value->SetInteger("texture_format", texture_format); | 86 value->SetInteger("texture_format", texture_format); |
| 90 // TODO(piman): picture_pile? | 87 // TODO(piman): picture_pile? |
| 91 } | 88 } |
| 92 | 89 |
| 93 } // namespace cc | 90 } // namespace cc |
| OLD | NEW |