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

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

Issue 256573003: cc: Remove the capability to give up and leave compositing mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 virtual void DidCommit() OVERRIDE { 398 virtual void DidCommit() OVERRIDE {
399 if (TestEnded()) 399 if (TestEnded())
400 return; 400 return;
401 scoped_ptr<DelegatedFrameData> frame1 = 401 scoped_ptr<DelegatedFrameData> frame1 =
402 CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1)); 402 CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1));
403 AddTextureQuad(frame1.get(), 999); 403 AddTextureQuad(frame1.get(), 999);
404 AddTransferableResource(frame1.get(), 999); 404 AddTransferableResource(frame1.get(), 999);
405 SetFrameData(frame1.Pass()); 405 SetFrameData(frame1.Pass());
406 } 406 }
407 407
408 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { 408 virtual void DidInitializeOutputSurface() OVERRIDE {
409 if (!num_output_surfaces_initialized_++) 409 if (!num_output_surfaces_initialized_++)
410 return; 410 return;
411 411
412 scoped_refptr<DelegatedRendererLayer> old_delegated = delegated_; 412 scoped_refptr<DelegatedRendererLayer> old_delegated = delegated_;
413 SetFrameData( 413 SetFrameData(
414 CreateInvalidFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1))); 414 CreateInvalidFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1)));
415 // Make sure we end up using the same layer, or we won't test the right 415 // Make sure we end up using the same layer, or we won't test the right
416 // thing, which is to make sure we can handle an invalid frame when using 416 // thing, which is to make sure we can handle an invalid frame when using
417 // a stale layer from before the context was lost. 417 // a stale layer from before the context was lost.
418 DCHECK(delegated_.get() == old_delegated.get()); 418 DCHECK(delegated_.get() == old_delegated.get());
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 } 2196 }
2197 2197
2198 scoped_refptr<DelegatedRendererLayer> delegated_thief_; 2198 scoped_refptr<DelegatedRendererLayer> delegated_thief_;
2199 }; 2199 };
2200 2200
2201 SINGLE_AND_MULTI_THREAD_TEST_F( 2201 SINGLE_AND_MULTI_THREAD_TEST_F(
2202 LayerTreeHostDelegatedTestRemoveAndChangeResources); 2202 LayerTreeHostDelegatedTestRemoveAndChangeResources);
2203 2203
2204 } // namespace 2204 } // namespace
2205 } // namespace cc 2205 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698