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