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

Side by Side Diff: cc/layers/heads_up_display_unittest.cc

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/layers/heads_up_display_layer.cc ('k') | cc/layers/io_surface_layer.h » ('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 #include "cc/layers/heads_up_display_layer.h" 5 #include "cc/layers/heads_up_display_layer.h"
6 #include "cc/layers/layer.h" 6 #include "cc/layers/layer.h"
7 #include "cc/test/layer_tree_test.h" 7 #include "cc/test/layer_tree_test.h"
8 #include "cc/trees/layer_tree_host.h" 8 #include "cc/trees/layer_tree_host.h"
9 9
10 namespace cc { 10 namespace cc {
11 namespace { 11 namespace {
12 12
13 class HeadsUpDisplayTest : public LayerTreeTest { 13 class HeadsUpDisplayTest : public LayerTreeTest {
14 protected: 14 protected:
15 void InitializeSettings(LayerTreeSettings* settings) override { 15 void InitializeSettings(LayerTreeSettings* settings) override {
16 // Enable the HUD without requiring text. 16 // Enable the HUD without requiring text.
17 settings->initial_debug_state.show_property_changed_rects = true; 17 settings->initial_debug_state.show_property_changed_rects = true;
18 } 18 }
19 }; 19 };
20 20
21 class DrawsContentLayer : public Layer { 21 class DrawsContentLayer : public Layer {
22 public: 22 public:
23 static scoped_refptr<DrawsContentLayer> Create() { 23 static scoped_refptr<DrawsContentLayer> Create() {
24 return make_scoped_refptr(new DrawsContentLayer()); 24 return make_scoped_refptr(new DrawsContentLayer());
25 } 25 }
26 bool DrawsContent() const override { return true; } 26 bool DrawsContent() const override { return true; }
27 27
28 private: 28 private:
29 DrawsContentLayer() : Layer(LayerSettings()) {} 29 DrawsContentLayer() {}
30 ~DrawsContentLayer() override {} 30 ~DrawsContentLayer() override {}
31 }; 31 };
32 32
33 class HudWithRootLayerChange : public HeadsUpDisplayTest { 33 class HudWithRootLayerChange : public HeadsUpDisplayTest {
34 public: 34 public:
35 HudWithRootLayerChange() 35 HudWithRootLayerChange()
36 : root_layer1_(DrawsContentLayer::Create()), 36 : root_layer1_(DrawsContentLayer::Create()),
37 root_layer2_(DrawsContentLayer::Create()), 37 root_layer2_(DrawsContentLayer::Create()),
38 num_commits_(0) {} 38 num_commits_(0) {}
39 39
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 private: 91 private:
92 scoped_refptr<DrawsContentLayer> root_layer1_; 92 scoped_refptr<DrawsContentLayer> root_layer1_;
93 scoped_refptr<DrawsContentLayer> root_layer2_; 93 scoped_refptr<DrawsContentLayer> root_layer2_;
94 int num_commits_; 94 int num_commits_;
95 }; 95 };
96 96
97 MULTI_THREAD_TEST_F(HudWithRootLayerChange); 97 MULTI_THREAD_TEST_F(HudWithRootLayerChange);
98 98
99 } // namespace 99 } // namespace
100 } // namespace cc 100 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer.cc ('k') | cc/layers/io_surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698