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

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

Issue 12662021: cc: Don't draw and swap if the frame will not change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/test/layer_tree_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYER_TREE_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_H_
6 #define CC_TEST_LAYER_TREE_TEST_H_ 6 #define CC_TEST_LAYER_TREE_TEST_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "cc/base/thread.h" 10 #include "cc/base/thread.h"
(...skipping 12 matching lines...) Expand all
23 class LayerTreeHost; 23 class LayerTreeHost;
24 class LayerTreeHostClient; 24 class LayerTreeHostClient;
25 class LayerTreeHostImpl; 25 class LayerTreeHostImpl;
26 26
27 // Used by test stubs to notify the test when something interesting happens. 27 // Used by test stubs to notify the test when something interesting happens.
28 class TestHooks : public WebKit::WebAnimationDelegate { 28 class TestHooks : public WebKit::WebAnimationDelegate {
29 public: 29 public:
30 TestHooks(); 30 TestHooks();
31 virtual ~TestHooks(); 31 virtual ~TestHooks();
32 32
33 void ReadSettings(const LayerTreeSettings& settings);
34
33 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} 35 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {}
34 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} 36 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {}
35 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) {} 37 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) {}
36 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, 38 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl,
37 bool success) {} 39 bool success) {}
38 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, 40 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
39 LayerTreeHostImpl::FrameData* frame_data, 41 LayerTreeHostImpl::FrameData* frame_data,
40 bool result); 42 bool result);
41 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} 43 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {}
42 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {} 44 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {}
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ 180 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \
179 RunTest(true); \ 181 RunTest(true); \
180 } \ 182 } \
181 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {} 183 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {}
182 184
183 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 185 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
184 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \ 186 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \
185 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) 187 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME)
186 188
187 #endif // CC_TEST_LAYER_TREE_TEST_H_ 189 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698