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

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

Issue 23686011: CC: Fix missing swap-used-incomplete-tile updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test. Created 7 years, 3 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/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool result = LayerTreeHostImpl::SwapBuffers(frame); 110 bool result = LayerTreeHostImpl::SwapBuffers(frame);
111 test_hooks_->SwapBuffersOnThread(this, result); 111 test_hooks_->SwapBuffersOnThread(this, result);
112 return result; 112 return result;
113 } 113 }
114 114
115 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE { 115 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE {
116 LayerTreeHostImpl::OnSwapBuffersComplete(ack); 116 LayerTreeHostImpl::OnSwapBuffersComplete(ack);
117 test_hooks_->SwapBuffersCompleteOnThread(this); 117 test_hooks_->SwapBuffersCompleteOnThread(this);
118 } 118 }
119 119
120 virtual void UpdateVisibleTiles() OVERRIDE {
121 LayerTreeHostImpl::UpdateVisibleTiles();
122 test_hooks_->UpdateVisibleTilesOnThread(this);
123 }
124
120 virtual void NotifyReadyToActivate() OVERRIDE { 125 virtual void NotifyReadyToActivate() OVERRIDE {
121 if (block_notify_ready_to_activate_for_testing_) 126 if (block_notify_ready_to_activate_for_testing_)
122 notify_ready_to_activate_was_blocked_ = true; 127 notify_ready_to_activate_was_blocked_ = true;
123 else 128 else
124 client_->NotifyReadyToActivate(); 129 client_->NotifyReadyToActivate();
125 } 130 }
126 131
127 virtual void BlockNotifyReadyToActivateForTesting(bool block) OVERRIDE { 132 virtual void BlockNotifyReadyToActivateForTesting(bool block) OVERRIDE {
128 block_notify_ready_to_activate_for_testing_ = block; 133 block_notify_ready_to_activate_for_testing_ = block;
129 if (!block && notify_ready_to_activate_was_blocked_) { 134 if (!block && notify_ready_to_activate_was_blocked_) {
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 636
632 scoped_refptr<cc::ContextProvider> LayerTreeTest:: 637 scoped_refptr<cc::ContextProvider> LayerTreeTest::
633 OffscreenContextProviderForCompositorThread() { 638 OffscreenContextProviderForCompositorThread() {
634 if (!compositor_thread_contexts_.get() || 639 if (!compositor_thread_contexts_.get() ||
635 compositor_thread_contexts_->DestroyedOnMainThread()) 640 compositor_thread_contexts_->DestroyedOnMainThread())
636 compositor_thread_contexts_ = TestContextProvider::Create(); 641 compositor_thread_contexts_ = TestContextProvider::Create();
637 return compositor_thread_contexts_; 642 return compositor_thread_contexts_;
638 } 643 }
639 644
640 } // namespace cc 645 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698