| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |