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

Side by Side Diff: blimp/client/compositor/test/dummy_layer_driver.h

Issue 1636163002: Restructure contents of blimp/client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2015 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 BLIMP_CLIENT_COMPOSITOR_TEST_DUMMY_LAYER_DRIVER_H_
6 #define BLIMP_CLIENT_COMPOSITOR_TEST_DUMMY_LAYER_DRIVER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h"
11
12 namespace cc {
13 class Layer;
14 }
15
16 namespace blimp {
17 namespace client {
18
19 // A test class that drives changes to a layer every 16ms. This can be used to
20 // make sure the compositor is rendering layers properly. In this case, colors
21 // are constantly changed over time.
22 class DummyLayerDriver {
23 public:
24 DummyLayerDriver();
25 virtual ~DummyLayerDriver();
26
27 // Adds a cc::SolidColorLayer to |layer| and animates it's color until the
28 // layer is detached from it's cc::LayerTreeHost.
29 void SetParentLayer(scoped_refptr<cc::Layer> layer);
30
31 private:
32 void StepAnimation();
33
34 scoped_refptr<cc::Layer> layer_;
35 bool animation_running_;
36
37 base::WeakPtrFactory<DummyLayerDriver> weak_factory_;
38
39 DISALLOW_COPY_AND_ASSIGN(DummyLayerDriver);
40 };
41
42 } // namespace client
43 } // namespace blimp
44
45 #endif // BLIMP_CLIENT_COMPOSITOR_TEST_DUMMY_LAYER_DRIVER_H_
OLDNEW
« no previous file with comments | « blimp/client/compositor/blimp_output_surface.cc ('k') | blimp/client/compositor/test/dummy_layer_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698