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

Side by Side Diff: cc/layers/tiled_layer_impl.cc

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/layers/tiled_layer_impl.h ('k') | cc/output/begin_frame_args.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 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/layers/tiled_layer_impl.h" 5 #include "cc/layers/tiled_layer_impl.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/debug/trace_event_argument.h"
9 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
10 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
11 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
12 #include "cc/layers/append_quads_data.h" 11 #include "cc/layers/append_quads_data.h"
13 #include "cc/quads/checkerboard_draw_quad.h" 12 #include "cc/quads/checkerboard_draw_quad.h"
14 #include "cc/quads/debug_border_draw_quad.h" 13 #include "cc/quads/debug_border_draw_quad.h"
15 #include "cc/quads/solid_color_draw_quad.h" 14 #include "cc/quads/solid_color_draw_quad.h"
16 #include "cc/quads/tile_draw_quad.h" 15 #include "cc/quads/tile_draw_quad.h"
17 #include "cc/resources/layer_tiling_data.h" 16 #include "cc/resources/layer_tiling_data.h"
18 #include "cc/trees/occlusion_tracker.h" 17 #include "cc/trees/occlusion_tracker.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 float* width) const { 92 float* width) const {
94 *color = DebugColors::TiledContentLayerBorderColor(); 93 *color = DebugColors::TiledContentLayerBorderColor();
95 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); 94 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl());
96 } 95 }
97 96
98 scoped_ptr<LayerImpl> TiledLayerImpl::CreateLayerImpl( 97 scoped_ptr<LayerImpl> TiledLayerImpl::CreateLayerImpl(
99 LayerTreeImpl* tree_impl) { 98 LayerTreeImpl* tree_impl) {
100 return TiledLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); 99 return TiledLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
101 } 100 }
102 101
103 void TiledLayerImpl::AsValueInto(base::debug::TracedValue* state) const { 102 void TiledLayerImpl::AsValueInto(base::DictionaryValue* state) const {
104 LayerImpl::AsValueInto(state); 103 LayerImpl::AsValueInto(state);
105 state->BeginArray("invalidation"); 104 state->Set("invalidation", MathUtil::AsValue(update_rect()).release());
106 MathUtil::AddToTracedValue(update_rect(), state);
107 state->EndArray();
108 } 105 }
109 106
110 size_t TiledLayerImpl::GPUMemoryUsageInBytes() const { 107 size_t TiledLayerImpl::GPUMemoryUsageInBytes() const {
111 size_t amount = 0; 108 size_t amount = 0;
112 const size_t kMemoryUsagePerTileInBytes = 109 const size_t kMemoryUsagePerTileInBytes =
113 4 * tiler_->tile_size().width() * tiler_->tile_size().height(); 110 4 * tiler_->tile_size().width() * tiler_->tile_size().height();
114 for (LayerTilingData::TileMap::const_iterator iter = tiler_->tiles().begin(); 111 for (LayerTilingData::TileMap::const_iterator iter = tiler_->tiles().begin();
115 iter != tiler_->tiles().end(); 112 iter != tiler_->tiles().end();
116 ++iter) { 113 ++iter) {
117 const DrawableTile* tile = static_cast<DrawableTile*>(iter->second); 114 const DrawableTile* tile = static_cast<DrawableTile*>(iter->second);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 308
312 void TiledLayerImpl::ReleaseResources() { 309 void TiledLayerImpl::ReleaseResources() {
313 tiler_->reset(); 310 tiler_->reset();
314 } 311 }
315 312
316 const char* TiledLayerImpl::LayerTypeAsString() const { 313 const char* TiledLayerImpl::LayerTypeAsString() const {
317 return "cc::TiledLayerImpl"; 314 return "cc::TiledLayerImpl";
318 } 315 }
319 316
320 } // namespace cc 317 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_impl.h ('k') | cc/output/begin_frame_args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698