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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 output_surface, | 532 output_surface, |
533 resource_provider, | 533 resource_provider, |
534 NULL, | 534 NULL, |
535 0), | 535 0), |
536 expect_overlays_(false) {} | 536 expect_overlays_(false) {} |
537 | 537 |
538 MOCK_METHOD2(DoDrawQuad, void(DrawingFrame* frame, const DrawQuad* quad)); | 538 MOCK_METHOD2(DoDrawQuad, void(DrawingFrame* frame, const DrawQuad* quad)); |
539 | 539 |
540 using GLRenderer::BeginDrawingFrame; | 540 using GLRenderer::BeginDrawingFrame; |
541 | 541 |
542 virtual void FinishDrawingFrame(DrawingFrame* frame) override { | 542 void FinishDrawingFrame(DrawingFrame* frame) override { |
543 GLRenderer::FinishDrawingFrame(frame); | 543 GLRenderer::FinishDrawingFrame(frame); |
544 | 544 |
545 if (!expect_overlays_) { | 545 if (!expect_overlays_) { |
546 EXPECT_EQ(0U, frame->overlay_list.size()); | 546 EXPECT_EQ(0U, frame->overlay_list.size()); |
547 return; | 547 return; |
548 } | 548 } |
549 | 549 |
550 ASSERT_EQ(2U, frame->overlay_list.size()); | 550 ASSERT_EQ(2U, frame->overlay_list.size()); |
551 EXPECT_NE(0U, frame->overlay_list.back().resource_id); | 551 EXPECT_NE(0U, frame->overlay_list.back().resource_id); |
552 } | 552 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 renderer_->BeginDrawingFrame(&frame3); | 805 renderer_->BeginDrawingFrame(&frame3); |
806 renderer_->FinishDrawingFrame(&frame3); | 806 renderer_->FinishDrawingFrame(&frame3); |
807 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); | 807 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); |
808 SwapBuffers(); | 808 SwapBuffers(); |
809 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 809 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
810 Mock::VerifyAndClearExpectations(&scheduler_); | 810 Mock::VerifyAndClearExpectations(&scheduler_); |
811 } | 811 } |
812 | 812 |
813 } // namespace | 813 } // namespace |
814 } // namespace cc | 814 } // namespace cc |
OLD | NEW |