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

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

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setvisible-browser: onemore Created 4 years, 4 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/surfaces/surface_display_output_surface_unittest.cc ('k') | cc/test/pixel_test.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTERNAL_BEGIN_FRAME_SOURCE_H_ 5 #ifndef CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_
6 #define CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_ 6 #define CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 20 matching lines...) Expand all
31 void SetPaused(bool paused); 31 void SetPaused(bool paused);
32 32
33 // BeginFrameSource implementation. 33 // BeginFrameSource implementation.
34 void AddObserver(BeginFrameObserver* obs) override; 34 void AddObserver(BeginFrameObserver* obs) override;
35 void RemoveObserver(BeginFrameObserver* obs) override; 35 void RemoveObserver(BeginFrameObserver* obs) override;
36 void DidFinishFrame(BeginFrameObserver* obs, 36 void DidFinishFrame(BeginFrameObserver* obs,
37 size_t remaining_frames) override {} 37 size_t remaining_frames) override {}
38 38
39 void TestOnBeginFrame(const BeginFrameArgs& args); 39 void TestOnBeginFrame(const BeginFrameArgs& args);
40 40
41 size_t num_observers() const { return observers_.size(); }
42
41 private: 43 private:
42 void PostTestOnBeginFrame(); 44 void PostTestOnBeginFrame();
43 45
44 const bool tick_automatically_; 46 const bool tick_automatically_;
45 const double milliseconds_per_frame_; 47 const double milliseconds_per_frame_;
46 Client* client_ = nullptr; 48 Client* client_ = nullptr;
47 bool paused_ = false; 49 bool paused_ = false;
48 std::set<BeginFrameObserver*> observers_; 50 std::set<BeginFrameObserver*> observers_;
49 base::CancelableCallback<void(const BeginFrameArgs&)> begin_frame_task_; 51 base::CancelableCallback<void(const BeginFrameArgs&)> begin_frame_task_;
50 base::WeakPtrFactory<FakeExternalBeginFrameSource> weak_ptr_factory_; 52 base::WeakPtrFactory<FakeExternalBeginFrameSource> weak_ptr_factory_;
51 }; 53 };
52 54
53 } // namespace cc 55 } // namespace cc
54 56
55 #endif // CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_ 57 #endif // CC_TEST_FAKE_EXTERNAL_BEGIN_FRAME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_display_output_surface_unittest.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698