| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/base/scoped_ptr_vector.h" | 5 #include "cc/base/scoped_ptr_vector.h" |
| 6 #include "cc/output/gl_renderer.h" | 6 #include "cc/output/gl_renderer.h" |
| 7 #include "cc/output/output_surface.h" | 7 #include "cc/output/output_surface.h" |
| 8 #include "cc/output/output_surface_client.h" | 8 #include "cc/output/output_surface_client.h" |
| 9 #include "cc/output/overlay_candidate_validator.h" | 9 #include "cc/output/overlay_candidate_validator.h" |
| 10 #include "cc/output/overlay_processor.h" | 10 #include "cc/output/overlay_processor.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 public: | 98 public: |
| 99 explicit OverlayOutputSurface(scoped_refptr<ContextProvider> context_provider) | 99 explicit OverlayOutputSurface(scoped_refptr<ContextProvider> context_provider) |
| 100 : OutputSurface(context_provider) {} | 100 : OutputSurface(context_provider) {} |
| 101 | 101 |
| 102 void InitWithSingleOverlayValidator() { | 102 void InitWithSingleOverlayValidator() { |
| 103 overlay_candidate_validator_.reset(new SingleOverlayValidator); | 103 overlay_candidate_validator_.reset(new SingleOverlayValidator); |
| 104 } | 104 } |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 scoped_ptr<RenderPass> CreateRenderPass() { | 107 scoped_ptr<RenderPass> CreateRenderPass() { |
| 108 RenderPass::Id id(1, 0); | 108 RenderPassId id(1, 0); |
| 109 gfx::Rect output_rect(0, 0, 256, 256); | 109 gfx::Rect output_rect(0, 0, 256, 256); |
| 110 bool has_transparent_background = true; | 110 bool has_transparent_background = true; |
| 111 | 111 |
| 112 scoped_ptr<RenderPass> pass = RenderPass::Create(); | 112 scoped_ptr<RenderPass> pass = RenderPass::Create(); |
| 113 pass->SetAll(id, | 113 pass->SetAll(id, |
| 114 output_rect, | 114 output_rect, |
| 115 output_rect, | 115 output_rect, |
| 116 gfx::Transform(), | 116 gfx::Transform(), |
| 117 has_transparent_background); | 117 has_transparent_background); |
| 118 | 118 |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 renderer_->set_expect_overlays(false); | 775 renderer_->set_expect_overlays(false); |
| 776 renderer_->FinishDrawingFrame(&frame3); | 776 renderer_->FinishDrawingFrame(&frame3); |
| 777 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); | 777 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); |
| 778 SwapBuffers(); | 778 SwapBuffers(); |
| 779 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 779 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
| 780 Mock::VerifyAndClearExpectations(&scheduler_); | 780 Mock::VerifyAndClearExpectations(&scheduler_); |
| 781 } | 781 } |
| 782 | 782 |
| 783 } // namespace | 783 } // namespace |
| 784 } // namespace cc | 784 } // namespace cc |
| OLD | NEW |