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

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

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 205473 Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/trees/layer_tree_host.h » ('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/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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time); 97 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time);
98 test_hooks_->DrawLayersOnThread(this); 98 test_hooks_->DrawLayersOnThread(this);
99 } 99 }
100 100
101 virtual bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) OVERRIDE { 101 virtual bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) OVERRIDE {
102 bool result = LayerTreeHostImpl::SwapBuffers(frame); 102 bool result = LayerTreeHostImpl::SwapBuffers(frame);
103 test_hooks_->SwapBuffersOnThread(this, result); 103 test_hooks_->SwapBuffersOnThread(this, result);
104 return result; 104 return result;
105 } 105 }
106 106
107 virtual void OnSwapBuffersComplete() OVERRIDE { 107 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE {
108 LayerTreeHostImpl::OnSwapBuffersComplete(); 108 LayerTreeHostImpl::OnSwapBuffersComplete(ack);
109 test_hooks_->SwapBuffersCompleteOnThread(this); 109 test_hooks_->SwapBuffersCompleteOnThread(this);
110 } 110 }
111 111
112 virtual bool ActivatePendingTreeIfNeeded() OVERRIDE { 112 virtual bool ActivatePendingTreeIfNeeded() OVERRIDE {
113 if (!pending_tree()) 113 if (!pending_tree())
114 return false; 114 return false;
115 115
116 if (!test_hooks_->CanActivatePendingTree(this)) 116 if (!test_hooks_->CanActivatePendingTree(this))
117 return false; 117 return false;
118 118
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 scoped_refptr<cc::ContextProvider> LayerTreeTest:: 600 scoped_refptr<cc::ContextProvider> LayerTreeTest::
601 OffscreenContextProviderForCompositorThread() { 601 OffscreenContextProviderForCompositorThread() {
602 if (!compositor_thread_contexts_.get() || 602 if (!compositor_thread_contexts_.get() ||
603 compositor_thread_contexts_->DestroyedOnMainThread()) 603 compositor_thread_contexts_->DestroyedOnMainThread())
604 compositor_thread_contexts_ = FakeContextProvider::Create(); 604 compositor_thread_contexts_ = FakeContextProvider::Create();
605 return compositor_thread_contexts_; 605 return compositor_thread_contexts_;
606 } 606 }
607 607
608 } // namespace cc 608 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698