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

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

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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/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/layer_updater.h" 8 #include "cc/layer_updater.h"
9 #include "cc/prioritized_resource.h" 9 #include "cc/prioritized_resource.h"
10 #include "cc/region.h" 10 #include "cc/region.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class FakeTiledLayer; 22 class FakeTiledLayer;
23 23
24 class FakeLayerUpdater : public cc::LayerUpdater { 24 class FakeLayerUpdater : public cc::LayerUpdater {
25 public: 25 public:
26 class Resource : public cc::LayerUpdater::Resource { 26 class Resource : public cc::LayerUpdater::Resource {
27 public: 27 public:
28 Resource(FakeLayerUpdater*, scoped_ptr<cc::PrioritizedResource>); 28 Resource(FakeLayerUpdater*, scoped_ptr<cc::PrioritizedResource>);
29 virtual ~Resource(); 29 virtual ~Resource();
30 30
31 virtual void update(cc::ResourceUpdateQueue&, const gfx::Rect&, const gf x::Vector2d&, bool, cc::RenderingStats&) OVERRIDE; 31 virtual void update(cc::ResourceUpdateQueue&, const gfx::Rect&, const gf x::Vector2d&, bool, cc::RenderingStats*) OVERRIDE;
32 32
33 private: 33 private:
34 FakeLayerUpdater* m_layer; 34 FakeLayerUpdater* m_layer;
35 SkBitmap m_bitmap; 35 SkBitmap m_bitmap;
36 }; 36 };
37 37
38 FakeLayerUpdater(); 38 FakeLayerUpdater();
39 39
40 virtual scoped_ptr<cc::LayerUpdater::Resource> createResource(cc::Prioritize dResourceManager*) OVERRIDE; 40 virtual scoped_ptr<cc::LayerUpdater::Resource> createResource(cc::Prioritize dResourceManager*) OVERRIDE;
41 41
42 virtual void prepareToUpdate(const gfx::Rect& contentRect, const gfx::Size&, float, float, gfx::Rect& resultingOpaqueRect, cc::RenderingStats&) OVERRIDE; 42 virtual void prepareToUpdate(const gfx::Rect& contentRect, const gfx::Size&, float, float, gfx::Rect& resultingOpaqueRect, cc::RenderingStats*) OVERRIDE;
43 // Sets the rect to invalidate during the next call to prepareToUpdate(). Af ter the next 43 // Sets the rect to invalidate during the next call to prepareToUpdate(). Af ter the next
44 // call to prepareToUpdate() the rect is reset. 44 // call to prepareToUpdate() the rect is reset.
45 void setRectToInvalidate(const gfx::Rect&, FakeTiledLayer*); 45 void setRectToInvalidate(const gfx::Rect&, FakeTiledLayer*);
46 // Last rect passed to prepareToUpdate(). 46 // Last rect passed to prepareToUpdate().
47 const gfx::Rect& lastUpdateRect() const { return m_lastUpdateRect; } 47 const gfx::Rect& lastUpdateRect() const { return m_lastUpdateRect; }
48 48
49 // Number of times prepareToUpdate has been invoked. 49 // Number of times prepareToUpdate has been invoked.
50 int prepareCount() const { return m_prepareCount; } 50 int prepareCount() const { return m_prepareCount; }
51 void clearPrepareCount() { m_prepareCount = 0; } 51 void clearPrepareCount() { m_prepareCount = 0; }
52 52
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual void didUpdateBounds() OVERRIDE; 126 virtual void didUpdateBounds() OVERRIDE;
127 127
128 protected: 128 protected:
129 virtual ~FakeTiledLayerWithScaledBounds(); 129 virtual ~FakeTiledLayerWithScaledBounds();
130 gfx::Size m_forcedContentBounds; 130 gfx::Size m_forcedContentBounds;
131 }; 131 };
132 132
133 } // namespace cc 133 } // namespace cc
134 134
135 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ 135 #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