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

Side by Side Diff: cc/test/tiled_layer_test_common.h

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 9 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
« no previous file with comments | « cc/test/fake_scrollbar_layer.cc ('k') | cc/test/tiled_layer_test_common.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 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_ 5 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_
6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_ 6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_
7 7
8 #include "cc/base/region.h" 8 #include "cc/base/region.h"
9 #include "cc/layers/tiled_layer.h" 9 #include "cc/layers/tiled_layer.h"
10 #include "cc/layers/tiled_layer_impl.h" 10 #include "cc/layers/tiled_layer_impl.h"
(...skipping 14 matching lines...) Expand all
25 public: 25 public:
26 class Resource : public LayerUpdater::Resource { 26 class Resource : public LayerUpdater::Resource {
27 public: 27 public:
28 Resource(FakeLayerUpdater* updater, 28 Resource(FakeLayerUpdater* updater,
29 scoped_ptr<PrioritizedResource> resource); 29 scoped_ptr<PrioritizedResource> resource);
30 virtual ~Resource(); 30 virtual ~Resource();
31 31
32 virtual void Update(ResourceUpdateQueue* queue, 32 virtual void Update(ResourceUpdateQueue* queue,
33 gfx::Rect source_rect, 33 gfx::Rect source_rect,
34 gfx::Vector2d dest_offset, 34 gfx::Vector2d dest_offset,
35 bool partial_update, 35 bool partial_update) OVERRIDE;
36 RenderingStats* stats) OVERRIDE;
37 36
38 private: 37 private:
39 FakeLayerUpdater* layer_; 38 FakeLayerUpdater* layer_;
40 SkBitmap bitmap_; 39 SkBitmap bitmap_;
41 40
42 DISALLOW_COPY_AND_ASSIGN(Resource); 41 DISALLOW_COPY_AND_ASSIGN(Resource);
43 }; 42 };
44 43
45 FakeLayerUpdater(); 44 FakeLayerUpdater();
46 45
47 virtual scoped_ptr<LayerUpdater::Resource> CreateResource( 46 virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
48 PrioritizedResourceManager* resource) OVERRIDE; 47 PrioritizedResourceManager* resource) OVERRIDE;
49 48
50 virtual void PrepareToUpdate(gfx::Rect content_rect, 49 virtual void PrepareToUpdate(gfx::Rect content_rect,
51 gfx::Size tile_size, 50 gfx::Size tile_size,
52 float contents_width_scale, 51 float contents_width_scale,
53 float contents_height_scale, 52 float contents_height_scale,
54 gfx::Rect* resulting_opaque_rect, 53 gfx::Rect* resulting_opaque_rect) OVERRIDE;
55 RenderingStats* stats) OVERRIDE;
56 // Sets the rect to invalidate during the next call to PrepareToUpdate(). 54 // Sets the rect to invalidate during the next call to PrepareToUpdate().
57 // After the next call to PrepareToUpdate() the rect is reset. 55 // After the next call to PrepareToUpdate() the rect is reset.
58 void SetRectToInvalidate(gfx::Rect rect, FakeTiledLayer* layer); 56 void SetRectToInvalidate(gfx::Rect rect, FakeTiledLayer* layer);
59 // Last rect passed to PrepareToUpdate(). 57 // Last rect passed to PrepareToUpdate().
60 gfx::Rect last_update_rect() const { return last_update_rect_; } 58 gfx::Rect last_update_rect() const { return last_update_rect_; }
61 59
62 // Number of times PrepareToUpdate has been invoked. 60 // Number of times PrepareToUpdate has been invoked.
63 int prepare_count() const { return prepare_count_; } 61 int prepare_count() const { return prepare_count_; }
64 void ClearPrepareCount() { prepare_count_ = 0; } 62 void ClearPrepareCount() { prepare_count_ = 0; }
65 63
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 protected: 148 protected:
151 virtual ~FakeTiledLayerWithScaledBounds(); 149 virtual ~FakeTiledLayerWithScaledBounds();
152 gfx::Size forced_content_bounds_; 150 gfx::Size forced_content_bounds_;
153 151
154 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayerWithScaledBounds); 152 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayerWithScaledBounds);
155 }; 153 };
156 154
157 } // namespace cc 155 } // namespace cc
158 156
159 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ 157 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/fake_scrollbar_layer.cc ('k') | cc/test/tiled_layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698