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

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

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 void Display::SetExternalClip(const gfx::Rect& clip) { 96 void Display::SetExternalClip(const gfx::Rect& clip) {
97 external_clip_ = clip; 97 external_clip_ = clip;
98 } 98 }
99 99
100 void Display::InitializeRenderer() { 100 void Display::InitializeRenderer() {
101 if (resource_provider_) 101 if (resource_provider_)
102 return; 102 return;
103 103
104 // Display does not use GpuMemoryBuffers, so persistent map is not relevant.
105 bool use_persistent_map_for_gpu_memory_buffers = false;
104 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( 106 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
105 output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_, 107 output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_,
106 nullptr, settings_.highp_threshold_min, settings_.use_rgba_4444_textures, 108 nullptr, settings_.highp_threshold_min, settings_.use_rgba_4444_textures,
107 settings_.texture_id_allocation_chunk_size); 109 settings_.texture_id_allocation_chunk_size,
110 use_persistent_map_for_gpu_memory_buffers);
108 if (!resource_provider) 111 if (!resource_provider)
109 return; 112 return;
110 113
111 if (output_surface_->context_provider()) { 114 if (output_surface_->context_provider()) {
112 scoped_ptr<GLRenderer> renderer = GLRenderer::Create( 115 scoped_ptr<GLRenderer> renderer = GLRenderer::Create(
113 this, &settings_, output_surface_.get(), resource_provider.get(), 116 this, &settings_, output_surface_.get(), resource_provider.get(),
114 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); 117 texture_mailbox_deleter_.get(), settings_.highp_threshold_min);
115 if (!renderer) 118 if (!renderer)
116 return; 119 return;
117 renderer_ = renderer.Pass(); 120 renderer_ = renderer.Pass();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 317
315 if (surface_id == current_surface_id_) 318 if (surface_id == current_surface_id_)
316 UpdateRootSurfaceResourcesLocked(); 319 UpdateRootSurfaceResourcesLocked();
317 } 320 }
318 321
319 SurfaceId Display::CurrentSurfaceId() { 322 SurfaceId Display::CurrentSurfaceId() {
320 return current_surface_id_; 323 return current_surface_id_;
321 } 324 }
322 325
323 } // namespace cc 326 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/surfaces/surface_display_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698