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

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

Issue 20667002: cc: Add frame data to LTHI tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
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/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h"
9 #include "cc/base/math_util.h"
8 #include "cc/quads/checkerboard_draw_quad.h" 10 #include "cc/quads/checkerboard_draw_quad.h"
9 #include "cc/quads/debug_border_draw_quad.h" 11 #include "cc/quads/debug_border_draw_quad.h"
10 #include "cc/quads/io_surface_draw_quad.h" 12 #include "cc/quads/io_surface_draw_quad.h"
11 #include "cc/quads/picture_draw_quad.h" 13 #include "cc/quads/picture_draw_quad.h"
12 #include "cc/quads/render_pass_draw_quad.h" 14 #include "cc/quads/render_pass_draw_quad.h"
13 #include "cc/quads/solid_color_draw_quad.h" 15 #include "cc/quads/solid_color_draw_quad.h"
14 #include "cc/quads/stream_video_draw_quad.h" 16 #include "cc/quads/stream_video_draw_quad.h"
15 #include "cc/quads/texture_draw_quad.h" 17 #include "cc/quads/texture_draw_quad.h"
16 #include "cc/quads/tile_draw_quad.h" 18 #include "cc/quads/tile_draw_quad.h"
17 #include "cc/quads/yuv_video_draw_quad.h" 19 #include "cc/quads/yuv_video_draw_quad.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 break; 85 break;
84 case RENDER_PASS: // RenderPass quads have their own copy() method. 86 case RENDER_PASS: // RenderPass quads have their own copy() method.
85 case INVALID: 87 case INVALID:
86 LOG(FATAL) << "Invalid DrawQuad material " << material; 88 LOG(FATAL) << "Invalid DrawQuad material " << material;
87 break; 89 break;
88 } 90 }
89 copy_quad->shared_quad_state = copied_shared_quad_state; 91 copy_quad->shared_quad_state = copied_shared_quad_state;
90 return copy_quad.Pass(); 92 return copy_quad.Pass();
91 } 93 }
92 94
95 scoped_ptr<base::Value> DrawQuad::AsValue() const {
96 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
97 value->SetInteger("material", material);
98 value->Set("transform", MathUtil::AsValue(
99 shared_quad_state->content_to_target_transform).release());
100 value->Set("rect", MathUtil::AsValue(rect).release());
vmpstr 2013/07/26 16:07:23 Maybe the rects can be named something like "conte
danakj 2013/07/26 16:49:08 Agree, content_rect is our typical nomenclature fo
piman 2013/07/31 00:36:43 Following our discussion, and the need to have a p
101 value->Set("opaque_rect", MathUtil::AsValue(opaque_rect).release());
102 value->Set("visible_rect", MathUtil::AsValue(visible_rect).release());
103 value->Set("layer_content_bounds", MathUtil::AsValue(
104 shared_quad_state->visible_content_rect).release());
105 value->Set("layer_visible_content_rect", MathUtil::AsValue(
106 shared_quad_state->visible_content_rect).release());
107 value->SetBoolean("is_clipped", shared_quad_state->is_clipped);
108 value->Set("clip_rect",
109 MathUtil::AsValue(shared_quad_state->clip_rect).release());
110 value->SetBoolean("needs_blending", needs_blending);
111 value->SetDouble("opacity", shared_quad_state->opacity);
112 value->SetBoolean("ShouldDrawWithBlending()", ShouldDrawWithBlending());
vmpstr 2013/07/26 16:07:23 should_draw_with_blending
piman 2013/07/31 00:36:43 Done.
113 ExtendValue(value.get());
114 return value.PassAs<base::Value>();
115 }
116
93 } // namespace cc 117 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698