Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: cc/quads/render_pass_draw_quad.cc

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/quads/render_pass_draw_quad.h ('k') | cc/quads/shared_quad_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
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/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
10 #include "third_party/skia/include/core/SkImageFilter.h" 11 #include "third_party/skia/include/core/SkImageFilter.h"
11 12
12 namespace cc { 13 namespace cc {
13 14
14 RenderPassDrawQuad::RenderPassDrawQuad() 15 RenderPassDrawQuad::RenderPassDrawQuad()
15 : render_pass_id(RenderPass::Id(-1, -1)), 16 : render_pass_id(RenderPass::Id(-1, -1)),
16 is_replica(false), 17 is_replica(false),
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if (mask_resource_id) 75 if (mask_resource_id)
75 mask_resource_id = callback.Run(mask_resource_id); 76 mask_resource_id = callback.Run(mask_resource_id);
76 } 77 }
77 78
78 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast( 79 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast(
79 const DrawQuad* quad) { 80 const DrawQuad* quad) {
80 DCHECK_EQ(quad->material, DrawQuad::RENDER_PASS); 81 DCHECK_EQ(quad->material, DrawQuad::RENDER_PASS);
81 return static_cast<const RenderPassDrawQuad*>(quad); 82 return static_cast<const RenderPassDrawQuad*>(quad);
82 } 83 }
83 84
84 void RenderPassDrawQuad::ExtendValue(base::DictionaryValue* value) const { 85 void RenderPassDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
85 value->Set("render_pass_id", 86 TracedValue::SetIDRef(render_pass_id.AsTracingId(), value, "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->Set("contents_changed_since_last_frame", 89 value->BeginArray("contents_changed_since_last_frame");
90 MathUtil::AsValue(contents_changed_since_last_frame).release()); 90 MathUtil::AddToTracedValue(contents_changed_since_last_frame, value);
91 value->Set("mask_uv_rect", MathUtil::AsValue(mask_uv_rect).release()); 91 value->EndArray();
92 value->Set("filters", filters.AsValue().release()); 92
93 value->Set("background_filters", background_filters.AsValue().release()); 93 value->BeginArray("mask_uv_rect");
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();
94 } 103 }
95 104
96 } // namespace cc 105 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/render_pass_draw_quad.h ('k') | cc/quads/shared_quad_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698