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

Side by Side Diff: cc/quads/picture_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/picture_draw_quad.h ('k') | cc/quads/render_pass.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 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
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
OLDNEW
« no previous file with comments | « cc/quads/picture_draw_quad.h ('k') | cc/quads/render_pass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698