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

Side by Side Diff: cc/quads/content_draw_quad_base.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/content_draw_quad_base.h ('k') | cc/quads/debug_border_draw_quad.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/content_draw_quad_base.h" 5 #include "cc/quads/content_draw_quad_base.h"
6 6
7 #include "base/debug/trace_event_argument.h"
7 #include "base/logging.h" 8 #include "base/logging.h"
8 #include "base/values.h" 9 #include "base/values.h"
9 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
10 11
11 namespace cc { 12 namespace cc {
12 13
13 ContentDrawQuadBase::ContentDrawQuadBase() 14 ContentDrawQuadBase::ContentDrawQuadBase()
14 : swizzle_contents(false) { 15 : swizzle_contents(false) {
15 } 16 }
16 17
(...skipping 25 matching lines...) Expand all
42 const gfx::RectF& tex_coord_rect, 43 const gfx::RectF& tex_coord_rect,
43 const gfx::Size& texture_size, 44 const gfx::Size& texture_size,
44 bool swizzle_contents) { 45 bool swizzle_contents) {
45 DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect, 46 DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect,
46 visible_rect, needs_blending); 47 visible_rect, needs_blending);
47 this->tex_coord_rect = tex_coord_rect; 48 this->tex_coord_rect = tex_coord_rect;
48 this->texture_size = texture_size; 49 this->texture_size = texture_size;
49 this->swizzle_contents = swizzle_contents; 50 this->swizzle_contents = swizzle_contents;
50 } 51 }
51 52
52 void ContentDrawQuadBase::ExtendValue(base::DictionaryValue* value) const { 53 void ContentDrawQuadBase::ExtendValue(base::debug::TracedValue* value) const {
53 value->Set("tex_coord_rect", MathUtil::AsValue(tex_coord_rect).release()); 54 value->BeginArray("tex_coord_rect");
54 value->Set("texture_size", MathUtil::AsValue(texture_size).release()); 55 MathUtil::AddToTracedValue(tex_coord_rect, value);
56 value->EndArray();
57
58 value->BeginDictionary("texture_size");
59 MathUtil::AddToTracedValue(texture_size, value);
60 value->EndDictionary();
61
55 value->SetBoolean("swizzle_contents", swizzle_contents); 62 value->SetBoolean("swizzle_contents", swizzle_contents);
56 } 63 }
57 64
58 } // namespace cc 65 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/content_draw_quad_base.h ('k') | cc/quads/debug_border_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698