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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 &output_surface, shared_bitmap_manager.get(), NULL, NULL, 0, false, 1)); | 250 &output_surface, shared_bitmap_manager.get(), NULL, NULL, 0, false, 1)); |
251 | 251 |
252 scoped_ptr<DefaultOverlayProcessor> overlay_processor( | 252 scoped_ptr<DefaultOverlayProcessor> overlay_processor( |
253 new DefaultOverlayProcessor(&output_surface, resource_provider.get())); | 253 new DefaultOverlayProcessor(&output_surface, resource_provider.get())); |
254 overlay_processor->Initialize(); | 254 overlay_processor->Initialize(); |
255 EXPECT_GE(1U, overlay_processor->GetStrategyCount()); | 255 EXPECT_GE(1U, overlay_processor->GetStrategyCount()); |
256 } | 256 } |
257 | 257 |
258 class SingleOverlayOnTopTest : public testing::Test { | 258 class SingleOverlayOnTopTest : public testing::Test { |
259 protected: | 259 protected: |
260 virtual void SetUp() { | 260 void SetUp() override { |
261 provider_ = TestContextProvider::Create(); | 261 provider_ = TestContextProvider::Create(); |
262 output_surface_.reset(new OverlayOutputSurface(provider_)); | 262 output_surface_.reset(new OverlayOutputSurface(provider_)); |
263 EXPECT_TRUE(output_surface_->BindToClient(&client_)); | 263 EXPECT_TRUE(output_surface_->BindToClient(&client_)); |
264 output_surface_->InitWithSingleOverlayValidator(); | 264 output_surface_->InitWithSingleOverlayValidator(); |
265 EXPECT_TRUE(output_surface_->overlay_candidate_validator() != NULL); | 265 EXPECT_TRUE(output_surface_->overlay_candidate_validator() != NULL); |
266 | 266 |
267 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 267 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
268 resource_provider_ = ResourceProvider::Create(output_surface_.get(), | 268 resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
269 shared_bitmap_manager_.get(), | 269 shared_bitmap_manager_.get(), |
270 NULL, | 270 NULL, |
(...skipping 536 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 |