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

Side by Side Diff: cc/quads/render_pass.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 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.h" 5 #include "cc/quads/render_pass.h"
6 6
7 #include "base/values.h"
8 #include "cc/base/math_util.h"
7 #include "cc/output/copy_output_request.h" 9 #include "cc/output/copy_output_request.h"
8 #include "cc/quads/draw_quad.h" 10 #include "cc/quads/draw_quad.h"
9 #include "cc/quads/shared_quad_state.h" 11 #include "cc/quads/shared_quad_state.h"
10 12
11 namespace cc { 13 namespace cc {
12 14
15 scoped_ptr<base::Value> RenderPass::Id::AsValue() const {
16 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
17 value->SetInteger("layer_id", layer_id);
18 value->SetInteger("index", index);
19 return value.PassAs<base::Value>();
20 }
21
13 scoped_ptr<RenderPass> RenderPass::Create() { 22 scoped_ptr<RenderPass> RenderPass::Create() {
14 return make_scoped_ptr(new RenderPass); 23 return make_scoped_ptr(new RenderPass);
15 } 24 }
16 25
17 RenderPass::RenderPass() 26 RenderPass::RenderPass()
18 : id(Id(-1, -1)), 27 : id(Id(-1, -1)),
19 has_transparent_background(true), 28 has_transparent_background(true),
20 has_occlusion_from_outside_target_surface(false) {} 29 has_occlusion_from_outside_target_surface(false) {}
21 30
22 RenderPass::~RenderPass() {} 31 RenderPass::~RenderPass() {}
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 this->damage_rect = damage_rect; 71 this->damage_rect = damage_rect;
63 this->transform_to_root_target = transform_to_root_target; 72 this->transform_to_root_target = transform_to_root_target;
64 this->has_transparent_background = has_transparent_background; 73 this->has_transparent_background = has_transparent_background;
65 this->has_occlusion_from_outside_target_surface = 74 this->has_occlusion_from_outside_target_surface =
66 has_occlusion_from_outside_target_surface; 75 has_occlusion_from_outside_target_surface;
67 76
68 DCHECK(quad_list.empty()); 77 DCHECK(quad_list.empty());
69 DCHECK(shared_quad_state_list.empty()); 78 DCHECK(shared_quad_state_list.empty());
70 } 79 }
71 80
81 scoped_ptr<base::Value> RenderPass::AsValue() const {
82 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
83 value->Set("render_pass_id", id.AsValue().release());
84 value->Set("output_rect", MathUtil::AsValue(output_rect).release());
85 value->Set("damage_rect", MathUtil::AsValue(damage_rect).release());
86 value->SetBoolean("has_transparent_background", has_transparent_background);
87 value->SetBoolean("has_occlusion_from_outside_target_surface",
88 has_occlusion_from_outside_target_surface);
89 value->SetInteger("copy_requests", copy_requests.size());
90 scoped_ptr<base::ListValue> quad_list_value(new base::ListValue());
91 for (size_t i = 0; i < quad_list.size(); ++i) {
92 quad_list_value->Append(quad_list[i]->AsValue().release());
93 }
94 value->Set("quad_list", quad_list_value.release());
95 return value.PassAs<base::Value>();
96 }
97
72 } // namespace cc 98 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698