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

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

Issue 775143003: cc: Implement unified BeginFrame on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unittest 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 5265 matching lines...) Expand 10 before | Expand all | Expand 10 after
5276 }; 5276 };
5277 5277
5278 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); 5278 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting);
5279 5279
5280 class LayerTreeHostTestSendBeginFramesToChildren : public LayerTreeHostTest { 5280 class LayerTreeHostTestSendBeginFramesToChildren : public LayerTreeHostTest {
5281 public: 5281 public:
5282 LayerTreeHostTestSendBeginFramesToChildren() 5282 LayerTreeHostTestSendBeginFramesToChildren()
5283 : begin_frame_sent_to_children_(false) { 5283 : begin_frame_sent_to_children_(false) {
5284 } 5284 }
5285 5285
5286 void InitializeSettings(LayerTreeSettings* settings) override {
5287 settings->forward_begin_frames_to_children = true;
5288 }
5289
5290 void BeginTest() override { 5286 void BeginTest() override {
5291 // Kick off the test with a commit. 5287 // Kick off the test with a commit.
5292 PostSetNeedsCommitToMainThread(); 5288 PostSetNeedsCommitToMainThread();
5293 } 5289 }
5294 5290
5295 void SendBeginFramesToChildren(const BeginFrameArgs& args) override { 5291 void SendBeginFramesToChildren(const BeginFrameArgs& args) override {
5296 begin_frame_sent_to_children_ = true; 5292 begin_frame_sent_to_children_ = true;
5297 EndTest(); 5293 EndTest();
5298 } 5294 }
5299 5295
(...skipping 16 matching lines...) Expand all
5316 5312
5317 class LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS 5313 class LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS
5318 : public LayerTreeHostTest { 5314 : public LayerTreeHostTest {
5319 public: 5315 public:
5320 LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS() 5316 LayerTreeHostTestSendBeginFramesToChildrenWithExternalBFS()
5321 : begin_frame_sent_to_children_(false) { 5317 : begin_frame_sent_to_children_(false) {
5322 } 5318 }
5323 5319
5324 void InitializeSettings(LayerTreeSettings* settings) override { 5320 void InitializeSettings(LayerTreeSettings* settings) override {
5325 settings->use_external_begin_frame_source = true; 5321 settings->use_external_begin_frame_source = true;
5326 settings->forward_begin_frames_to_children = true;
5327 } 5322 }
5328 5323
5329 void BeginTest() override { 5324 void BeginTest() override {
5330 // Kick off the test with a commit. 5325 // Kick off the test with a commit.
5331 PostSetNeedsCommitToMainThread(); 5326 PostSetNeedsCommitToMainThread();
5332 } 5327 }
5333 5328
5334 void SendBeginFramesToChildren(const BeginFrameArgs& args) override { 5329 void SendBeginFramesToChildren(const BeginFrameArgs& args) override {
5335 begin_frame_sent_to_children_ = true; 5330 begin_frame_sent_to_children_ = true;
5336 EndTest(); 5331 EndTest();
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
6358 6353
6359 void AfterTest() override {} 6354 void AfterTest() override {}
6360 6355
6361 private: 6356 private:
6362 scoped_refptr<Layer> child_; 6357 scoped_refptr<Layer> child_;
6363 }; 6358 };
6364 6359
6365 SINGLE_AND_MULTI_THREAD_TEST_F(LayerPreserveRenderSurfaceFromOutputRequests); 6360 SINGLE_AND_MULTI_THREAD_TEST_F(LayerPreserveRenderSurfaceFromOutputRequests);
6366 6361
6367 } // namespace cc 6362 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698