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

Side by Side Diff: cc/surfaces/display.cc

Issue 2253823002: cc: Remove all impl-side caps from RendererCapabilitiesImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delete-renderer-base-class
Patch Set: renderercaps: ennereview Created 4 years, 4 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/software_renderer_unittest.cc ('k') | cc/test/layer_tree_pixel_resource_test.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/surfaces/display.h" 5 #include "cc/surfaces/display.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 #else 190 #else
191 NOTREACHED(); 191 NOTREACHED();
192 #endif 192 #endif
193 } else { 193 } else {
194 auto renderer = base::MakeUnique<SoftwareRenderer>( 194 auto renderer = base::MakeUnique<SoftwareRenderer>(
195 &settings_, output_surface_.get(), resource_provider_.get()); 195 &settings_, output_surface_.get(), resource_provider_.get());
196 software_renderer_ = renderer.get(); 196 software_renderer_ = renderer.get();
197 renderer_ = std::move(renderer); 197 renderer_ = std::move(renderer);
198 } 198 }
199 199
200 renderer_->Initialize();
200 renderer_->SetVisible(visible_); 201 renderer_->SetVisible(visible_);
201 202
202 // TODO(jbauman): Outputting an incomplete quad list doesn't work when using 203 // TODO(jbauman): Outputting an incomplete quad list doesn't work when using
203 // overlays. 204 // overlays.
204 bool output_partial_list = renderer_->Capabilities().using_partial_swap && 205 bool output_partial_list = renderer_->use_partial_swap() &&
205 !output_surface_->GetOverlayCandidateValidator(); 206 !output_surface_->GetOverlayCandidateValidator();
206 aggregator_.reset(new SurfaceAggregator( 207 aggregator_.reset(new SurfaceAggregator(
207 surface_manager_, resource_provider_.get(), output_partial_list)); 208 surface_manager_, resource_provider_.get(), output_partial_list));
208 aggregator_->set_output_is_secure(output_is_secure_); 209 aggregator_->set_output_is_secure(output_is_secure_);
209 } 210 }
210 211
211 void Display::DidLoseOutputSurface() { 212 void Display::DidLoseOutputSurface() {
212 if (scheduler_) 213 if (scheduler_)
213 scheduler_->OutputSurfaceLost(); 214 scheduler_->OutputSurfaceLost();
214 // WARNING: The client may delete the Display in this method call. Do not 215 // WARNING: The client may delete the Display in this method call. Do not
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 const SurfaceId& Display::CurrentSurfaceId() { 432 const SurfaceId& Display::CurrentSurfaceId() {
432 return current_surface_id_; 433 return current_surface_id_;
433 } 434 }
434 435
435 void Display::ForceImmediateDrawAndSwapIfPossible() { 436 void Display::ForceImmediateDrawAndSwapIfPossible() {
436 if (scheduler_) 437 if (scheduler_)
437 scheduler_->ForceImmediateSwapIfPossible(); 438 scheduler_->ForceImmediateSwapIfPossible();
438 } 439 }
439 440
440 } // namespace cc 441 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/test/layer_tree_pixel_resource_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698