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

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

Issue 13245007: cc: Remove RenderingStats passed to ContentLayerUpdater during Layer::Update() (Closed) Base URL: http://git.chromium.org/chromium/src.git@three
Patch Set: Rebase to 208926 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
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 float page_scale_factor, 144 float page_scale_factor,
147 bool animating_transform_to_screen, 145 bool animating_transform_to_screen,
148 float* contents_scale_x, 146 float* contents_scale_x,
149 float* contents_scale_y, 147 float* contents_scale_y,
150 gfx::Size* content_bounds) OVERRIDE; 148 gfx::Size* content_bounds) OVERRIDE;
151 149
152 protected: 150 protected:
153 virtual ~FakeTiledLayerWithScaledBounds(); 151 virtual ~FakeTiledLayerWithScaledBounds();
154 gfx::Size forced_content_bounds_; 152 gfx::Size forced_content_bounds_;
155 153
154 private:
156 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayerWithScaledBounds); 155 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayerWithScaledBounds);
157 }; 156 };
158 157
159 } // namespace cc 158 } // namespace cc
160 159
161 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ 160 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.cc ('k') | cc/test/tiled_layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698