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

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 1716813002: Use GpuPreferences to avoid directly accessing switches in gpu related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 9 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 | « gpu/gles2_conform_support/egl/display.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/gles2_conform_support/egl/display.h" 5 #include "gpu/gles2_conform_support/egl/display.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 new gpu::TransferBufferManager(nullptr); 159 new gpu::TransferBufferManager(nullptr);
160 transfer_buffer_manager_ = manager; 160 transfer_buffer_manager_ = manager;
161 manager->Initialize(); 161 manager->Initialize();
162 } 162 }
163 scoped_ptr<gpu::CommandBufferService> command_buffer( 163 scoped_ptr<gpu::CommandBufferService> command_buffer(
164 new gpu::CommandBufferService(transfer_buffer_manager_.get())); 164 new gpu::CommandBufferService(transfer_buffer_manager_.get()));
165 if (!command_buffer->Initialize()) 165 if (!command_buffer->Initialize())
166 return NULL; 166 return NULL;
167 167
168 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( 168 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup(
169 NULL, NULL, new gpu::gles2::ShaderTranslatorCache, 169 gpu_preferences_, NULL, NULL,
170 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_),
170 new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true)); 171 new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true));
171 172
172 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); 173 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
173 if (!decoder_.get()) 174 if (!decoder_.get())
174 return EGL_NO_SURFACE; 175 return EGL_NO_SURFACE;
175 176
176 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), 177 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(),
177 decoder_.get(), 178 decoder_.get(),
178 NULL)); 179 NULL));
179 180
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, 397 void Display::SignalSyncToken(const gpu::SyncToken& sync_token,
397 const base::Closure& callback) { 398 const base::Closure& callback) {
398 NOTIMPLEMENTED(); 399 NOTIMPLEMENTED();
399 } 400 }
400 401
401 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { 402 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) {
402 return false; 403 return false;
403 } 404 }
404 405
405 } // namespace egl 406 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/display.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698