OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ipc/in_process_command_buffer.h" | 5 #include "gpu/ipc/in_process_command_buffer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 command_buffer_ = std::move(command_buffer); | 325 command_buffer_ = std::move(command_buffer); |
326 | 326 |
327 decoder_->set_engine(executor_.get()); | 327 decoder_->set_engine(executor_.get()); |
328 | 328 |
329 if (!surface_.get()) { | 329 if (!surface_.get()) { |
330 if (params.is_offscreen) { | 330 if (params.is_offscreen) { |
331 surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size()); | 331 surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size()); |
332 } else { | 332 } else { |
333 surface_ = ImageTransportSurface::CreateNativeSurface( | 333 surface_ = ImageTransportSurface::CreateNativeSurface( |
334 gpu_thread_weak_ptr_factory_.GetWeakPtr(), params.window, | 334 gpu_thread_weak_ptr_factory_.GetWeakPtr(), params.window, |
335 gl::GLSurface::SURFACE_DEFAULT); | 335 gl::GLSurfaceFormat()); |
336 if (!surface_ || !surface_->Initialize(gl::GLSurface::SURFACE_DEFAULT)) { | 336 if (!surface_ || !surface_->Initialize(gl::GLSurfaceFormat())) { |
337 surface_ = nullptr; | 337 surface_ = nullptr; |
338 DLOG(ERROR) << "Failed to create surface."; | 338 DLOG(ERROR) << "Failed to create surface."; |
339 return false; | 339 return false; |
340 } | 340 } |
341 } | 341 } |
342 } | 342 } |
343 | 343 |
344 if (!surface_.get()) { | 344 if (!surface_.get()) { |
345 LOG(ERROR) << "Could not create GLSurface."; | 345 LOG(ERROR) << "Could not create GLSurface."; |
346 DestroyOnGpuThread(); | 346 DestroyOnGpuThread(); |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 return wrapped_callback; | 1165 return wrapped_callback; |
1166 } | 1166 } |
1167 | 1167 |
1168 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, | 1168 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, |
1169 uint32_t order_number) | 1169 uint32_t order_number) |
1170 : callback(callback), order_number(order_number) {} | 1170 : callback(callback), order_number(order_number) {} |
1171 | 1171 |
1172 InProcessCommandBuffer::GpuTask::~GpuTask() {} | 1172 InProcessCommandBuffer::GpuTask::~GpuTask() {} |
1173 | 1173 |
1174 } // namespace gpu | 1174 } // namespace gpu |
OLD | NEW |