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

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

Issue 2041093002: Prevent use of GPU IDC in Resourceless Software Draw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/pixel_test.h » ('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/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.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 this, &settings_, output_surface_.get(), resource_provider.get(), 190 this, &settings_, output_surface_.get(), resource_provider.get(),
191 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); 191 texture_mailbox_deleter_.get(), settings_.highp_threshold_min);
192 if (!renderer) 192 if (!renderer)
193 return; 193 return;
194 renderer_ = std::move(renderer); 194 renderer_ = std::move(renderer);
195 #else 195 #else
196 NOTREACHED(); 196 NOTREACHED();
197 #endif 197 #endif
198 } else { 198 } else {
199 std::unique_ptr<SoftwareRenderer> renderer = SoftwareRenderer::Create( 199 std::unique_ptr<SoftwareRenderer> renderer = SoftwareRenderer::Create(
200 this, &settings_, output_surface_.get(), resource_provider.get()); 200 this, &settings_, output_surface_.get(), resource_provider.get(),
201 true /* use_image_hijack_canvas */);
201 if (!renderer) 202 if (!renderer)
202 return; 203 return;
203 renderer_ = std::move(renderer); 204 renderer_ = std::move(renderer);
204 } 205 }
205 206
206 resource_provider_ = std::move(resource_provider); 207 resource_provider_ = std::move(resource_provider);
207 // TODO(jbauman): Outputting an incomplete quad list doesn't work when using 208 // TODO(jbauman): Outputting an incomplete quad list doesn't work when using
208 // overlays. 209 // overlays.
209 bool output_partial_list = renderer_->Capabilities().using_partial_swap && 210 bool output_partial_list = renderer_->Capabilities().using_partial_swap &&
210 !output_surface_->GetOverlayCandidateValidator(); 211 !output_surface_->GetOverlayCandidateValidator();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 420
420 if (surface_id == current_surface_id_) 421 if (surface_id == current_surface_id_)
421 UpdateRootSurfaceResourcesLocked(); 422 UpdateRootSurfaceResourcesLocked();
422 } 423 }
423 424
424 SurfaceId Display::CurrentSurfaceId() { 425 SurfaceId Display::CurrentSurfaceId() {
425 return current_surface_id_; 426 return current_surface_id_;
426 } 427 }
427 428
428 } // namespace cc 429 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/test/pixel_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698