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

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

Issue 1425533006: cc: Add flag to specify to ResourceProvider to always use GMBs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test and build Created 5 years, 1 month 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 "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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 void Display::InitializeRenderer() { 101 void Display::InitializeRenderer() {
102 if (resource_provider_) 102 if (resource_provider_)
103 return; 103 return;
104 104
105 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( 105 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
106 output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_, 106 output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_,
107 nullptr, settings_.highp_threshold_min, 107 nullptr, settings_.highp_threshold_min,
108 settings_.texture_id_allocation_chunk_size, 108 settings_.texture_id_allocation_chunk_size,
109 settings_.use_gpu_memory_buffer_resources,
109 std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1, 110 std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1,
110 GL_TEXTURE_2D)); 111 GL_TEXTURE_2D));
111 if (!resource_provider) 112 if (!resource_provider)
112 return; 113 return;
113 114
114 if (output_surface_->context_provider()) { 115 if (output_surface_->context_provider()) {
115 scoped_ptr<GLRenderer> renderer = GLRenderer::Create( 116 scoped_ptr<GLRenderer> renderer = GLRenderer::Create(
116 this, &settings_, output_surface_.get(), resource_provider.get(), 117 this, &settings_, output_surface_.get(), resource_provider.get(),
117 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); 118 texture_mailbox_deleter_.get(), settings_.highp_threshold_min);
118 if (!renderer) 119 if (!renderer)
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 353
353 if (surface_id == current_surface_id_) 354 if (surface_id == current_surface_id_)
354 UpdateRootSurfaceResourcesLocked(); 355 UpdateRootSurfaceResourcesLocked();
355 } 356 }
356 357
357 SurfaceId Display::CurrentSurfaceId() { 358 SurfaceId Display::CurrentSurfaceId() {
358 return current_surface_id_; 359 return current_surface_id_;
359 } 360 }
360 361
361 } // namespace cc 362 } // 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