Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: cc/output/overlay_unittest.cc

Issue 889063002: (not for commit) Create 2nd ContextProvider for Ganesh rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698