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

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

Issue 263653002: Move traced_value.* from cc/debug/ to base/debug/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added BASE_EXPORT Created 6 years, 7 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/layers/picture_layer_impl.cc ('k') | cc/quads/render_pass.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/draw_quad.h" 5 #include "cc/quads/draw_quad.h"
6 6
7 #include "base/debug/traced_value.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 #include "cc/debug/traced_value.h"
11 #include "cc/quads/checkerboard_draw_quad.h" 11 #include "cc/quads/checkerboard_draw_quad.h"
12 #include "cc/quads/debug_border_draw_quad.h" 12 #include "cc/quads/debug_border_draw_quad.h"
13 #include "cc/quads/io_surface_draw_quad.h" 13 #include "cc/quads/io_surface_draw_quad.h"
14 #include "cc/quads/picture_draw_quad.h" 14 #include "cc/quads/picture_draw_quad.h"
15 #include "cc/quads/render_pass_draw_quad.h" 15 #include "cc/quads/render_pass_draw_quad.h"
16 #include "cc/quads/solid_color_draw_quad.h" 16 #include "cc/quads/solid_color_draw_quad.h"
17 #include "cc/quads/stream_video_draw_quad.h" 17 #include "cc/quads/stream_video_draw_quad.h"
18 #include "cc/quads/surface_draw_quad.h" 18 #include "cc/quads/surface_draw_quad.h"
19 #include "cc/quads/texture_draw_quad.h" 19 #include "cc/quads/texture_draw_quad.h"
20 #include "cc/quads/tile_draw_quad.h" 20 #include "cc/quads/tile_draw_quad.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 LOG(FATAL) << "Invalid DrawQuad material " << material; 101 LOG(FATAL) << "Invalid DrawQuad material " << material;
102 break; 102 break;
103 } 103 }
104 copy_quad->shared_quad_state = copied_shared_quad_state; 104 copy_quad->shared_quad_state = copied_shared_quad_state;
105 return copy_quad.Pass(); 105 return copy_quad.Pass();
106 } 106 }
107 107
108 scoped_ptr<base::Value> DrawQuad::AsValue() const { 108 scoped_ptr<base::Value> DrawQuad::AsValue() const {
109 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 109 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
110 value->SetInteger("material", material); 110 value->SetInteger("material", material);
111 value->Set("shared_state", 111 value->Set(
112 TracedValue::CreateIDRef(shared_quad_state).release()); 112 "shared_state",
113 base::debug::TracedValue::CreateIDRef(shared_quad_state).release());
113 114
114 value->Set("content_space_rect", MathUtil::AsValue(rect).release()); 115 value->Set("content_space_rect", MathUtil::AsValue(rect).release());
115 bool rect_is_clipped; 116 bool rect_is_clipped;
116 gfx::QuadF rect_as_target_space_quad = MathUtil::MapQuad( 117 gfx::QuadF rect_as_target_space_quad = MathUtil::MapQuad(
117 shared_quad_state->content_to_target_transform, 118 shared_quad_state->content_to_target_transform,
118 gfx::QuadF(rect), 119 gfx::QuadF(rect),
119 &rect_is_clipped); 120 &rect_is_clipped);
120 value->Set("rect_as_target_space_quad", 121 value->Set("rect_as_target_space_quad",
121 MathUtil::AsValue(rect_as_target_space_quad).release()); 122 MathUtil::AsValue(rect_as_target_space_quad).release());
122 value->SetBoolean("rect_is_clipped", rect_is_clipped); 123 value->SetBoolean("rect_is_clipped", rect_is_clipped);
(...skipping 20 matching lines...) Expand all
143 MathUtil::AsValue(visible_rect_as_target_space_quad).release()); 144 MathUtil::AsValue(visible_rect_as_target_space_quad).release());
144 value->SetBoolean("visible_rect_is_clipped", visible_rect_is_clipped); 145 value->SetBoolean("visible_rect_is_clipped", visible_rect_is_clipped);
145 146
146 value->SetBoolean("needs_blending", needs_blending); 147 value->SetBoolean("needs_blending", needs_blending);
147 value->SetBoolean("should_draw_with_blending", ShouldDrawWithBlending()); 148 value->SetBoolean("should_draw_with_blending", ShouldDrawWithBlending());
148 ExtendValue(value.get()); 149 ExtendValue(value.get());
149 return value.PassAs<base::Value>(); 150 return value.PassAs<base::Value>();
150 } 151 }
151 152
152 } // namespace cc 153 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/quads/render_pass.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698