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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 ResourceProvider* resource_provider) | 93 ResourceProvider* resource_provider) |
94 : OverlayProcessor(surface, resource_provider) {} | 94 : OverlayProcessor(surface, resource_provider) {} |
95 | 95 |
96 size_t DefaultOverlayProcessor::GetStrategyCount() { | 96 size_t DefaultOverlayProcessor::GetStrategyCount() { |
97 return strategies_.size(); | 97 return strategies_.size(); |
98 } | 98 } |
99 | 99 |
100 class OverlayOutputSurface : public OutputSurface { | 100 class OverlayOutputSurface : public OutputSurface { |
101 public: | 101 public: |
102 explicit OverlayOutputSurface(scoped_refptr<ContextProvider> context_provider) | 102 explicit OverlayOutputSurface(scoped_refptr<ContextProvider> context_provider) |
103 : OutputSurface(context_provider) {} | 103 : OutputSurface(context_provider, scoped_refptr<ContextProvider>()) {} |
104 | 104 |
105 // OutputSurface implementation | 105 // OutputSurface implementation |
106 void SwapBuffers(CompositorFrame* frame) override; | 106 void SwapBuffers(CompositorFrame* frame) override; |
107 | 107 |
108 void InitWithSingleOverlayValidator() { | 108 void InitWithSingleOverlayValidator() { |
109 overlay_candidate_validator_.reset(new SingleOverlayValidator); | 109 overlay_candidate_validator_.reset(new SingleOverlayValidator); |
110 } | 110 } |
111 }; | 111 }; |
112 | 112 |
113 void OverlayOutputSurface::SwapBuffers(CompositorFrame* frame) { | 113 void OverlayOutputSurface::SwapBuffers(CompositorFrame* frame) { |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 renderer_->BeginDrawingFrame(&frame3); | 807 renderer_->BeginDrawingFrame(&frame3); |
808 renderer_->FinishDrawingFrame(&frame3); | 808 renderer_->FinishDrawingFrame(&frame3); |
809 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); | 809 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); |
810 SwapBuffers(); | 810 SwapBuffers(); |
811 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 811 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
812 Mock::VerifyAndClearExpectations(&scheduler_); | 812 Mock::VerifyAndClearExpectations(&scheduler_); |
813 } | 813 } |
814 | 814 |
815 } // namespace | 815 } // namespace |
816 } // namespace cc | 816 } // namespace cc |
OLD | NEW |