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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 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_layer_tree_host_impl.cc ('k') | cc/test/fake_painted_scrollbar_layer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FAKE_PAINTED_SCROLLBAR_LAYER_H_ 5 #ifndef CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_
6 #define CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ 6 #define CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "cc/layers/painted_scrollbar_layer.h" 11 #include "cc/layers/painted_scrollbar_layer.h"
12 #include "cc/test/fake_scrollbar.h" 12 #include "cc/test/fake_scrollbar.h"
13 13
14 namespace base { template<typename T> class AutoReset; } 14 namespace base { template<typename T> class AutoReset; }
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer { 18 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer {
19 public: 19 public:
20 static scoped_refptr<FakePaintedScrollbarLayer> Create( 20 static scoped_refptr<FakePaintedScrollbarLayer> Create(
21 const LayerSettings& settings,
22 bool paint_during_update, 21 bool paint_during_update,
23 bool has_thumb, 22 bool has_thumb,
24 int scrolling_layer_id); 23 int scrolling_layer_id);
25 int update_count() const { return update_count_; } 24 int update_count() const { return update_count_; }
26 void reset_update_count() { update_count_ = 0; } 25 void reset_update_count() { update_count_ = 0; }
27 26
28 bool Update() override; 27 bool Update() override;
29 28
30 void PushPropertiesTo(LayerImpl* layer) override; 29 void PushPropertiesTo(LayerImpl* layer) override;
31 30
32 scoped_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit(); 31 scoped_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit();
33 32
34 size_t push_properties_count() const { return push_properties_count_; } 33 size_t push_properties_count() const { return push_properties_count_; }
35 void reset_push_properties_count() { push_properties_count_ = 0; } 34 void reset_push_properties_count() { push_properties_count_ = 0; }
36 35
37 // For unit tests 36 // For unit tests
38 UIResourceId track_resource_id() { 37 UIResourceId track_resource_id() {
39 return PaintedScrollbarLayer::track_resource_id(); 38 return PaintedScrollbarLayer::track_resource_id();
40 } 39 }
41 UIResourceId thumb_resource_id() { 40 UIResourceId thumb_resource_id() {
42 return PaintedScrollbarLayer::thumb_resource_id(); 41 return PaintedScrollbarLayer::thumb_resource_id();
43 } 42 }
44 FakeScrollbar* fake_scrollbar() { 43 FakeScrollbar* fake_scrollbar() {
45 return fake_scrollbar_; 44 return fake_scrollbar_;
46 } 45 }
47 using PaintedScrollbarLayer::UpdateInternalContentScale; 46 using PaintedScrollbarLayer::UpdateInternalContentScale;
48 using PaintedScrollbarLayer::UpdateThumbAndTrackGeometry; 47 using PaintedScrollbarLayer::UpdateThumbAndTrackGeometry;
49 48
50 private: 49 private:
51 FakePaintedScrollbarLayer(const LayerSettings& settings, 50 FakePaintedScrollbarLayer(FakeScrollbar* fake_scrollbar,
52 FakeScrollbar* fake_scrollbar,
53 int scrolling_layer_id); 51 int scrolling_layer_id);
54 ~FakePaintedScrollbarLayer() override; 52 ~FakePaintedScrollbarLayer() override;
55 53
56 int update_count_; 54 int update_count_;
57 size_t push_properties_count_; 55 size_t push_properties_count_;
58 FakeScrollbar* fake_scrollbar_; 56 FakeScrollbar* fake_scrollbar_;
59 }; 57 };
60 58
61 } // namespace cc 59 } // namespace cc
62 60
63 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ 61 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.cc ('k') | cc/test/fake_painted_scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698