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

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1000503002: Add BeginFrameObserverProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 5268 matching lines...) Expand 10 before | Expand all | Expand 10 after
5279 }; 5279 };
5280 5280
5281 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); 5281 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting);
5282 5282
5283 class LayerTreeHostTestSendBeginFramesToChildren : public LayerTreeHostTest { 5283 class LayerTreeHostTestSendBeginFramesToChildren : public LayerTreeHostTest {
5284 public: 5284 public:
5285 LayerTreeHostTestSendBeginFramesToChildren() 5285 LayerTreeHostTestSendBeginFramesToChildren()
5286 : begin_frame_sent_to_children_(false) { 5286 : begin_frame_sent_to_children_(false) {
5287 } 5287 }
5288 5288
5289 void InitializeSettings(LayerTreeSettings* settings) override {
5290 settings->forward_begin_frames_to_children = true;
5291 }
5292
5293 void BeginTest() override { 5289 void BeginTest() override {
5294 // Kick off the test with a commit. 5290 // Kick off the test with a commit.
5295 PostSetNeedsCommitToMainThread(); 5291 PostSetNeedsCommitToMainThread();
5296 } 5292 }
5297 5293
5298 void SendBeginFramesToChildren(const BeginFrameArgs& args) override { 5294 void SendBeginFramesToChildren(const BeginFrameArgs& args) override {
5299 begin_frame_sent_to_children_ = true; 5295 begin_frame_sent_to_children_ = true;
5300 EndTest(); 5296 EndTest();
5301 } 5297 }
5302 5298
(...skipping 16 matching lines...) Expand all
5319 5315
5320 class LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS 5316 class LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS
5321 : public LayerTreeHostTest { 5317 : public LayerTreeHostTest {
5322 public: 5318 public:
5323 LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS() 5319 LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS()
5324 : begin_frame_sent_to_children_(false) { 5320 : begin_frame_sent_to_children_(false) {
5325 } 5321 }
5326 5322
5327 void InitializeSettings(LayerTreeSettings* settings) override { 5323 void InitializeSettings(LayerTreeSettings* settings) override {
5328 settings->use_external_begin_frame_source = true; 5324 settings->use_external_begin_frame_source = true;
5329 settings->forward_begin_frames_to_children = true;
5330 } 5325 }
5331 5326
5332 void BeginTest() override { 5327 void BeginTest() override {
5333 // Kick off the test with a commit. 5328 // Kick off the test with a commit.
5334 PostSetNeedsCommitToMainThread(); 5329 PostSetNeedsCommitToMainThread();
5335 } 5330 }
5336 5331
5337 void SendBeginFramesToChildren(const BeginFrameArgs& args) override { 5332 void SendBeginFramesToChildren(const BeginFrameArgs& args) override {
5338 begin_frame_sent_to_children_ = true; 5333 begin_frame_sent_to_children_ = true;
5339 EndTest(); 5334 EndTest();
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
6361 6356
6362 void AfterTest() override {} 6357 void AfterTest() override {}
6363 6358
6364 private: 6359 private:
6365 scoped_refptr<Layer> child_; 6360 scoped_refptr<Layer> child_;
6366 }; 6361 };
6367 6362
6368 SINGLE_AND_MULTI_THREAD_TEST_F(LayerPreserveRenderSurfaceFromOutputRequests); 6363 SINGLE_AND_MULTI_THREAD_TEST_F(LayerPreserveRenderSurfaceFromOutputRequests);
6369 6364
6370 } // namespace cc 6365 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698