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

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

Issue 205193006: gpu: Remove map_image field from gpu::Capabilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move TODO Created 6 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | mojo/gles2/command_buffer_client_impl.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 (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 <vector> 7 #include <vector>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "gpu/command_buffer/client/gles2_implementation.h" 10 #include "gpu/command_buffer/client/gles2_implementation.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (!decoder_->Initialize(gl_surface_.get(), 164 if (!decoder_->Initialize(gl_surface_.get(),
165 gl_context_.get(), 165 gl_context_.get(),
166 gl_surface_->IsOffscreen(), 166 gl_surface_->IsOffscreen(),
167 size, 167 size,
168 gpu::gles2::DisallowedFeatures(), 168 gpu::gles2::DisallowedFeatures(),
169 attribs)) { 169 attribs)) {
170 return EGL_NO_SURFACE; 170 return EGL_NO_SURFACE;
171 } 171 }
172 172
173 gpu_control_.reset(new gpu::GpuControlService( 173 gpu_control_.reset(new gpu::GpuControlService(
174 NULL, NULL, group->mailbox_manager(), NULL, decoder_->GetCapabilities())); 174 NULL, NULL, group->mailbox_manager(), NULL));
175 175
176 command_buffer->SetPutOffsetChangeCallback( 176 command_buffer->SetPutOffsetChangeCallback(
177 base::Bind(&gpu::GpuScheduler::PutChanged, 177 base::Bind(&gpu::GpuScheduler::PutChanged,
178 base::Unretained(gpu_scheduler_.get()))); 178 base::Unretained(gpu_scheduler_.get())));
179 command_buffer->SetGetBufferChangeCallback( 179 command_buffer->SetGetBufferChangeCallback(
180 base::Bind(&gpu::GpuScheduler::SetGetBuffer, 180 base::Bind(&gpu::GpuScheduler::SetGetBuffer,
181 base::Unretained(gpu_scheduler_.get()))); 181 base::Unretained(gpu_scheduler_.get())));
182 182
183 scoped_ptr<gpu::gles2::GLES2CmdHelper> cmd_helper( 183 scoped_ptr<gpu::gles2::GLES2CmdHelper> cmd_helper(
184 new gpu::gles2::GLES2CmdHelper(command_buffer.get())); 184 new gpu::gles2::GLES2CmdHelper(command_buffer.get()));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 DCHECK(command_buffer_ != NULL); 228 DCHECK(command_buffer_ != NULL);
229 DCHECK(transfer_buffer_.get()); 229 DCHECK(transfer_buffer_.get());
230 230
231 bool bind_generates_resources = true; 231 bool bind_generates_resources = true;
232 232
233 context_.reset(new gpu::gles2::GLES2Implementation( 233 context_.reset(new gpu::gles2::GLES2Implementation(
234 gles2_cmd_helper_.get(), 234 gles2_cmd_helper_.get(),
235 NULL, 235 NULL,
236 transfer_buffer_.get(), 236 transfer_buffer_.get(),
237 bind_generates_resources, 237 bind_generates_resources,
238 gpu_control_.get())); 238 gpu_control_.get(),
239 decoder_->GetCapabilities()));
239 240
240 if (!context_->Initialize( 241 if (!context_->Initialize(
241 kTransferBufferSize, 242 kTransferBufferSize,
242 kTransferBufferSize / 2, 243 kTransferBufferSize / 2,
243 kTransferBufferSize * 2, 244 kTransferBufferSize * 2,
244 gpu::gles2::GLES2Implementation::kNoLimit)) { 245 gpu::gles2::GLES2Implementation::kNoLimit)) {
245 return EGL_NO_CONTEXT; 246 return EGL_NO_CONTEXT;
246 } 247 }
247 248
248 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets"); 249 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets");
(...skipping 14 matching lines...) Expand all
263 } else { 264 } else {
264 DCHECK(IsValidSurface(draw)); 265 DCHECK(IsValidSurface(draw));
265 DCHECK(IsValidSurface(read)); 266 DCHECK(IsValidSurface(read));
266 DCHECK(IsValidContext(ctx)); 267 DCHECK(IsValidContext(ctx));
267 gles2::SetGLContext(context_.get()); 268 gles2::SetGLContext(context_.get());
268 } 269 }
269 return true; 270 return true;
270 } 271 }
271 272
272 } // namespace egl 273 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | mojo/gles2/command_buffer_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698