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

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

Issue 96073002: Revert 237848 "Use LatencyInfoSwapPromise to track LatencyInfo t..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
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 5223 matching lines...) Expand 10 before | Expand all | Expand 10 after
5234 public: 5234 public:
5235 explicit TestSwapPromise(TestSwapPromiseResult* result) 5235 explicit TestSwapPromise(TestSwapPromiseResult* result)
5236 : result_(result) { 5236 : result_(result) {
5237 } 5237 }
5238 5238
5239 virtual ~TestSwapPromise() { 5239 virtual ~TestSwapPromise() {
5240 base::AutoLock lock(result_->lock); 5240 base::AutoLock lock(result_->lock);
5241 result_->dtor_called = true; 5241 result_->dtor_called = true;
5242 } 5242 }
5243 5243
5244 virtual void DidSwap(CompositorFrameMetadata* metadata) OVERRIDE { 5244 virtual void DidSwap() OVERRIDE {
5245 base::AutoLock lock(result_->lock); 5245 base::AutoLock lock(result_->lock);
5246 EXPECT_FALSE(result_->did_swap_called); 5246 EXPECT_FALSE(result_->did_swap_called);
5247 EXPECT_FALSE(result_->did_not_swap_called); 5247 EXPECT_FALSE(result_->did_not_swap_called);
5248 result_->did_swap_called = true; 5248 result_->did_swap_called = true;
5249 } 5249 }
5250 5250
5251 virtual void DidNotSwap(DidNotSwapReason reason) OVERRIDE { 5251 virtual void DidNotSwap(DidNotSwapReason reason) OVERRIDE {
5252 base::AutoLock lock(result_->lock); 5252 base::AutoLock lock(result_->lock);
5253 EXPECT_FALSE(result_->did_swap_called); 5253 EXPECT_FALSE(result_->did_swap_called);
5254 EXPECT_FALSE(result_->did_not_swap_called); 5254 EXPECT_FALSE(result_->did_not_swap_called);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
5330 } 5330 }
5331 5331
5332 int commit_count_; 5332 int commit_count_;
5333 int commit_complete_count_; 5333 int commit_complete_count_;
5334 TestSwapPromiseResult swap_promise_result_[3]; 5334 TestSwapPromiseResult swap_promise_result_[3];
5335 }; 5335 };
5336 5336
5337 MULTI_THREAD_TEST_F(LayerTreeHostTestBreakSwapPromise); 5337 MULTI_THREAD_TEST_F(LayerTreeHostTestBreakSwapPromise);
5338 5338
5339 } // namespace cc 5339 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/trees/layer_tree_host_impl_unittest.cc ('k') | trunk/src/cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698