OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/render_pass_draw_quad.h" | 5 #include "cc/quads/render_pass_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/debug/traced_value.h" | 9 #include "cc/debug/traced_value.h" |
11 #include "third_party/skia/include/core/SkImageFilter.h" | 10 #include "third_party/skia/include/core/SkImageFilter.h" |
12 | 11 |
13 namespace cc { | 12 namespace cc { |
14 | 13 |
15 RenderPassDrawQuad::RenderPassDrawQuad() | 14 RenderPassDrawQuad::RenderPassDrawQuad() |
16 : render_pass_id(RenderPass::Id(-1, -1)), | 15 : render_pass_id(RenderPass::Id(-1, -1)), |
17 is_replica(false), | 16 is_replica(false), |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 if (mask_resource_id) | 74 if (mask_resource_id) |
76 mask_resource_id = callback.Run(mask_resource_id); | 75 mask_resource_id = callback.Run(mask_resource_id); |
77 } | 76 } |
78 | 77 |
79 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast( | 78 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast( |
80 const DrawQuad* quad) { | 79 const DrawQuad* quad) { |
81 DCHECK_EQ(quad->material, DrawQuad::RENDER_PASS); | 80 DCHECK_EQ(quad->material, DrawQuad::RENDER_PASS); |
82 return static_cast<const RenderPassDrawQuad*>(quad); | 81 return static_cast<const RenderPassDrawQuad*>(quad); |
83 } | 82 } |
84 | 83 |
85 void RenderPassDrawQuad::ExtendValue(base::debug::TracedValue* value) const { | 84 void RenderPassDrawQuad::ExtendValue(base::DictionaryValue* value) const { |
86 TracedValue::SetIDRef(render_pass_id.AsTracingId(), value, "render_pass_id"); | 85 value->Set("render_pass_id", |
| 86 TracedValue::CreateIDRef(render_pass_id.AsTracingId()).release()); |
87 value->SetBoolean("is_replica", is_replica); | 87 value->SetBoolean("is_replica", is_replica); |
88 value->SetInteger("mask_resource_id", mask_resource_id); | 88 value->SetInteger("mask_resource_id", mask_resource_id); |
89 value->BeginArray("contents_changed_since_last_frame"); | 89 value->Set("contents_changed_since_last_frame", |
90 MathUtil::AddToTracedValue(contents_changed_since_last_frame, value); | 90 MathUtil::AsValue(contents_changed_since_last_frame).release()); |
91 value->EndArray(); | 91 value->Set("mask_uv_rect", MathUtil::AsValue(mask_uv_rect).release()); |
92 | 92 value->Set("filters", filters.AsValue().release()); |
93 value->BeginArray("mask_uv_rect"); | 93 value->Set("background_filters", background_filters.AsValue().release()); |
94 MathUtil::AddToTracedValue(mask_uv_rect, value); | |
95 value->EndArray(); | |
96 value->BeginDictionary("filters"); | |
97 filters.AsValueInto(value); | |
98 value->EndDictionary(); | |
99 | |
100 value->BeginDictionary("background_filters"); | |
101 background_filters.AsValueInto(value); | |
102 value->EndDictionary(); | |
103 } | 94 } |
104 | 95 |
105 } // namespace cc | 96 } // namespace cc |
OLD | NEW |