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

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

Issue 2007593005: Remove the concept of OutputSurface from ResourceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resourceprovider-no-outputsurface: moreccptcompile Created 4 years, 7 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/resources/resource_provider_unittest.cc ('k') | cc/test/fake_resource_provider.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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Force a redraw. 159 // Force a redraw.
160 if (!current_surface_id_.is_null()) 160 if (!current_surface_id_.is_null())
161 aggregator_->SetFullDamageForSurface(current_surface_id_); 161 aggregator_->SetFullDamageForSurface(current_surface_id_);
162 } 162 }
163 } 163 }
164 164
165 void Display::InitializeRenderer() { 165 void Display::InitializeRenderer() {
166 if (resource_provider_) 166 if (resource_provider_)
167 return; 167 return;
168 168
169 std::unique_ptr<ResourceProvider> resource_provider = 169 std::unique_ptr<ResourceProvider> resource_provider(new ResourceProvider(
170 ResourceProvider::Create( 170 output_surface_->context_provider(), bitmap_manager_,
171 output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_, 171 gpu_memory_buffer_manager_, nullptr, settings_.highp_threshold_min,
172 nullptr, settings_.highp_threshold_min, 172 settings_.texture_id_allocation_chunk_size,
173 settings_.texture_id_allocation_chunk_size, 173 output_surface_->capabilities().delegated_sync_points_required,
174 settings_.use_gpu_memory_buffer_resources, 174 settings_.use_gpu_memory_buffer_resources,
175 std::vector<unsigned>( 175 std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1,
176 static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D)); 176 GL_TEXTURE_2D)));
177 if (!resource_provider)
178 return;
179 177
180 if (output_surface_->context_provider()) { 178 if (output_surface_->context_provider()) {
181 std::unique_ptr<GLRenderer> renderer = GLRenderer::Create( 179 std::unique_ptr<GLRenderer> renderer = GLRenderer::Create(
182 this, &settings_, output_surface_.get(), resource_provider.get(), 180 this, &settings_, output_surface_.get(), resource_provider.get(),
183 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); 181 texture_mailbox_deleter_.get(), settings_.highp_threshold_min);
184 if (!renderer) 182 if (!renderer)
185 return; 183 return;
186 renderer_ = std::move(renderer); 184 renderer_ = std::move(renderer);
187 } else if (output_surface_->vulkan_context_provider()) { 185 } else if (output_surface_->vulkan_context_provider()) {
188 #if defined(ENABLE_VULKAN) 186 #if defined(ENABLE_VULKAN)
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 417
420 if (surface_id == current_surface_id_) 418 if (surface_id == current_surface_id_)
421 UpdateRootSurfaceResourcesLocked(); 419 UpdateRootSurfaceResourcesLocked();
422 } 420 }
423 421
424 SurfaceId Display::CurrentSurfaceId() { 422 SurfaceId Display::CurrentSurfaceId() {
425 return current_surface_id_; 423 return current_surface_id_;
426 } 424 }
427 425
428 } // namespace cc 426 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/test/fake_resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698