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

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

Issue 2456093003: Enable more layer_tree_host_unittest for LayerTreeHostRemote. (Closed)
Patch Set: Minor polish on refactored test class. Created 4 years, 1 month 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/proto/layer.proto ('k') | cc/test/push_properties_counting_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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_H_
6 #define CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "cc/layers/layer.h"
13 #include "cc/proto/layer.pb.h"
14
15 namespace cc {
16
17 class LayerImpl;
18 class LayerTreeImpl;
19
20 class PushPropertiesCountingLayer : public Layer {
21 public:
22 static scoped_refptr<PushPropertiesCountingLayer> Create();
23
24 // Layer implementation.
25 void PushPropertiesTo(LayerImpl* layer) override;
26 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
27 void ToLayerPropertiesProto(proto::LayerUpdate* layer_update,
28 bool inputs_only) override;
29 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override;
30
31 // Something to make this layer push properties, but no other layer.
32 void MakePushProperties();
33
34 size_t push_properties_count() const { return push_properties_count_; }
35 void reset_push_properties_count() { push_properties_count_ = 0; }
36
37 void set_persist_needs_push_properties(bool persist) {
38 persist_needs_push_properties_ = persist;
39 }
40
41 private:
42 PushPropertiesCountingLayer();
43 ~PushPropertiesCountingLayer() override;
44
45 void AddPushPropertiesCount();
46
47 size_t push_properties_count_;
48 bool persist_needs_push_properties_;
49
50 DISALLOW_COPY_AND_ASSIGN(PushPropertiesCountingLayer);
51 };
52
53 } // namespace cc
54
55 #endif // CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_H_
OLDNEW
« no previous file with comments | « cc/proto/layer.proto ('k') | cc/test/push_properties_counting_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698