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

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

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation again 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/output/swap_promise.h ('k') | cc/trees/layer_tree_impl.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 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 4466 matching lines...) Expand 10 before | Expand all | Expand 10 after
4477 result_->did_activate_called = true; 4477 result_->did_activate_called = true;
4478 } 4478 }
4479 4479
4480 void DidSwap(CompositorFrameMetadata* metadata) override { 4480 void DidSwap(CompositorFrameMetadata* metadata) override {
4481 base::AutoLock lock(result_->lock); 4481 base::AutoLock lock(result_->lock);
4482 EXPECT_FALSE(result_->did_swap_called); 4482 EXPECT_FALSE(result_->did_swap_called);
4483 EXPECT_FALSE(result_->did_not_swap_called); 4483 EXPECT_FALSE(result_->did_not_swap_called);
4484 result_->did_swap_called = true; 4484 result_->did_swap_called = true;
4485 } 4485 }
4486 4486
4487 void DidNotSwap(DidNotSwapReason reason) override { 4487 DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override {
4488 base::AutoLock lock(result_->lock); 4488 base::AutoLock lock(result_->lock);
4489 EXPECT_FALSE(result_->did_swap_called); 4489 EXPECT_FALSE(result_->did_swap_called);
4490 EXPECT_FALSE(result_->did_not_swap_called); 4490 EXPECT_FALSE(result_->did_not_swap_called);
4491 EXPECT_FALSE(result_->did_activate_called && 4491 EXPECT_FALSE(result_->did_activate_called &&
4492 reason != DidNotSwapReason::SWAP_FAILS); 4492 reason != DidNotSwapReason::SWAP_FAILS);
4493 result_->did_not_swap_called = true; 4493 result_->did_not_swap_called = true;
4494 result_->reason = reason; 4494 result_->reason = reason;
4495 return DidNotSwapAction::BREAK_PROMISE;
4495 } 4496 }
4496 4497
4497 int64_t TraceId() const override { return 0; } 4498 int64_t TraceId() const override { return 0; }
4498 4499
4499 private: 4500 private:
4500 // Not owned. 4501 // Not owned.
4501 TestSwapPromiseResult* result_; 4502 TestSwapPromiseResult* result_;
4502 }; 4503 };
4503 4504
4504 class PinnedLayerTreeSwapPromise : public LayerTreeHostTest { 4505 class PinnedLayerTreeSwapPromise : public LayerTreeHostTest {
(...skipping 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after
7050 private: 7051 private:
7051 FakeContentLayerClient client_; 7052 FakeContentLayerClient client_;
7052 const gfx::Size viewport_size_; 7053 const gfx::Size viewport_size_;
7053 const gfx::Size large_image_size_; 7054 const gfx::Size large_image_size_;
7054 }; 7055 };
7055 7056
7056 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage); 7057 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage);
7057 7058
7058 } // namespace 7059 } // namespace
7059 } // namespace cc 7060 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/swap_promise.h ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698