diff options
-rw-r--r-- | cc/cc.gyp | 1 | ||||
-rw-r--r-- | cc/devtools_instrumentation.h | 57 | ||||
-rw-r--r-- | cc/picture_layer.cc | 3 | ||||
-rw-r--r-- | cc/picture_layer.h | 3 | ||||
-rw-r--r-- | cc/picture_layer_impl.cc | 3 | ||||
-rw-r--r-- | cc/tile.cc | 6 | ||||
-rw-r--r-- | cc/tile.h | 6 | ||||
-rw-r--r-- | cc/tile_manager.cc | 3 | ||||
-rw-r--r-- | cc/tile_manager.h | 1 |
9 files changed, 4 insertions, 79 deletions
@@ -56,7 +56,6 @@ 'delegated_renderer_layer_impl.h', 'delegating_renderer.cc', 'delegating_renderer.h', - 'devtools_instrumentation.h', 'direct_renderer.cc', 'direct_renderer.h', 'draw_properties.h', diff --git a/cc/devtools_instrumentation.h b/cc/devtools_instrumentation.h deleted file mode 100644 index 04b6ef8..0000000 --- a/cc/devtools_instrumentation.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CC_DEVTOOLS_INSTRUMENTATION_H_ -#define CC_DEVTOOLS_INSTRUMENTATION_H_ - -#include "base/debug/trace_event.h" - -namespace cc { -namespace devtools_instrumentation { - -namespace internal { -const char kCategory[] = "cc,devtools"; -const char kLayerId[] = "layerId"; -const char kPaintLayer[] = "PaintLayer"; -const char kRasterTask[] = "RasterTask"; -} - -struct ScopedPaintLayer -{ - ScopedPaintLayer(int layer_id) { - TRACE_EVENT_BEGIN1(internal::kCategory, internal::kPaintLayer, - internal::kLayerId, layer_id); - } - ~ScopedPaintLayer() { - TRACE_EVENT_END0(internal::kCategory, internal::kPaintLayer); - } -}; - -struct ScopedRasterTask -{ - ScopedRasterTask(int layer_id) { - TRACE_EVENT_BEGIN1(internal::kCategory, internal::kRasterTask, - internal::kLayerId, layer_id); - } - ~ScopedRasterTask() { - TRACE_EVENT_END0(internal::kCategory, internal::kRasterTask); - } -}; - -struct ScopedLayerObjectTracker - : public base::debug::TraceScopedTrackableObject<int> -{ - ScopedLayerObjectTracker(int layer_id) - : base::debug::TraceScopedTrackableObject<int>( - internal::kCategory, - internal::kLayerId, - layer_id) { - } -}; - -} -} - -#endif - diff --git a/cc/picture_layer.cc b/cc/picture_layer.cc index 8c5bc91..b9ce65a 100644 --- a/cc/picture_layer.cc +++ b/cc/picture_layer.cc @@ -4,7 +4,6 @@ #include "cc/picture_layer.h" -#include "cc/devtools_instrumentation.h" #include "cc/layer_tree_impl.h" #include "cc/picture_layer_impl.h" #include "ui/gfx/rect_conversions.h" @@ -18,7 +17,6 @@ scoped_refptr<PictureLayer> PictureLayer::create(ContentLayerClient* client) { PictureLayer::PictureLayer(ContentLayerClient* client) : client_(client), pile_(make_scoped_refptr(new PicturePile())), - instrumentation_object_tracker_(id()), is_mask_(false) { } @@ -76,7 +74,6 @@ void PictureLayer::update(ResourceUpdateQueue&, const OcclusionTracker*, gfx::Rect visible_layer_rect = gfx::ToEnclosingRect( gfx::ScaleRect(visibleContentRect(), 1.f / contentsScaleX())); - devtools_instrumentation::ScopedPaintLayer paint_layer(id()); pile_->Update(client_, pile_invalidation_, visible_layer_rect, stats); } diff --git a/cc/picture_layer.h b/cc/picture_layer.h index ff756bc..a0739d9 100644 --- a/cc/picture_layer.h +++ b/cc/picture_layer.h @@ -6,7 +6,6 @@ #define CC_PICTURE_LAYER_H_ #include "cc/contents_scaling_layer.h" -#include "cc/devtools_instrumentation.h" #include "cc/layer.h" #include "cc/picture_pile.h" #include "cc/occlusion_tracker.h" @@ -43,8 +42,6 @@ class CC_EXPORT PictureLayer : public ContentsScalingLayer { private: ContentLayerClient* client_; scoped_refptr<PicturePile> pile_; - devtools_instrumentation:: - ScopedLayerObjectTracker instrumentation_object_tracker_; // Invalidation to use the next time update is called. Region pending_invalidation_; // Invalidation from the last time update was called. diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc index f0ce9ad..007302e 100644 --- a/cc/picture_layer_impl.cc +++ b/cc/picture_layer_impl.cc @@ -333,8 +333,7 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, GL_RGBA, content_rect, contentsOpaque() ? content_rect : gfx::Rect(), - tiling->contents_scale(), - id())); + tiling->contents_scale())); } void PictureLayerImpl::UpdatePile(Tile* tile) { @@ -16,15 +16,13 @@ Tile::Tile(TileManager* tile_manager, GLenum format, gfx::Rect content_rect, gfx::Rect opaque_rect, - float contents_scale, - int layer_id) + float contents_scale) : tile_manager_(tile_manager), tile_size_(tile_size), format_(format), content_rect_(content_rect), opaque_rect_(opaque_rect), - contents_scale_(contents_scale), - layer_id_(layer_id) { + contents_scale_(contents_scale) { set_picture_pile(picture_pile); tile_manager_->RegisterTile(this); } @@ -28,8 +28,7 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> { GLenum format, gfx::Rect content_rect, gfx::Rect opaque_rect, - float contents_scale, - int layer_id); + float contents_scale); PicturePileImpl* picture_pile() { return picture_pile_.get(); @@ -68,8 +67,6 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> { float contents_scale() const { return contents_scale_; } gfx::Rect content_rect() const { return content_rect_; } - int layer_id() const { return layer_id_; } - void set_picture_pile(scoped_refptr<PicturePileImpl> pile) { DCHECK(pile->CanRaster(contents_scale_, content_rect_)); picture_pile_ = pile; @@ -104,7 +101,6 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> { TilePriority priority_[NUM_BIN_PRIORITIES]; ManagedTileState managed_state_; - int layer_id_; }; } // namespace cc diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc index 054b5e5..580759f 100644 --- a/cc/tile_manager.cc +++ b/cc/tile_manager.cc @@ -11,7 +11,6 @@ #include "base/json/json_writer.h" #include "base/logging.h" #include "base/metrics/histogram.h" -#include "cc/devtools_instrumentation.h" #include "cc/math_util.h" #include "cc/platform_color.h" #include "cc/raster_worker_pool.h" @@ -821,7 +820,6 @@ TileManager::RasterTaskMetadata TileManager::GetRasterTaskMetadata( metadata.is_tile_in_pending_tree_now_bin = mts.tree_bin[PENDING_TREE] == NOW_BIN; metadata.tile_resolution = mts.resolution; - metadata.layer_id = tile.layer_id(); return metadata; } @@ -924,7 +922,6 @@ void TileManager::RunRasterTask(uint8* buffer, metadata.is_tile_in_pending_tree_now_bin, "is_low_res", metadata.tile_resolution == LOW_RESOLUTION); - devtools_instrumentation::ScopedRasterTask raster_task(metadata.layer_id); DCHECK(picture_pile); DCHECK(buffer); diff --git a/cc/tile_manager.h b/cc/tile_manager.h index 6d2c621..3d2d4b3 100644 --- a/cc/tile_manager.h +++ b/cc/tile_manager.h @@ -151,7 +151,6 @@ class CC_EXPORT TileManager : public WorkerPoolClient { bool use_cheapness_estimator; bool is_tile_in_pending_tree_now_bin; TileResolution tile_resolution; - int layer_id; }; RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const; |