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/command_buffer/service/async_pixel_transfer_manager_share_group.h" | 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void InitializeOnTransferThread(gfx::GLContext* parent_context, | 85 void InitializeOnTransferThread(gfx::GLContext* parent_context, |
86 base::WaitableEvent* caller_wait) { | 86 base::WaitableEvent* caller_wait) { |
87 TRACE_EVENT0("gpu", "InitializeOnTransferThread"); | 87 TRACE_EVENT0("gpu", "InitializeOnTransferThread"); |
88 | 88 |
89 if (!parent_context) { | 89 if (!parent_context) { |
90 LOG(ERROR) << "No parent context provided."; | 90 LOG(ERROR) << "No parent context provided."; |
91 caller_wait->Signal(); | 91 caller_wait->Signal(); |
92 return; | 92 return; |
93 } | 93 } |
94 | 94 |
95 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); | 95 surface_ = gfx::GLSurface::CreateOffscreenGLSurface( |
| 96 gfx::Size(1, 1), gfx::SurfaceConfiguration()); |
96 if (!surface_.get()) { | 97 if (!surface_.get()) { |
97 LOG(ERROR) << "Unable to create GLSurface"; | 98 LOG(ERROR) << "Unable to create GLSurface"; |
98 caller_wait->Signal(); | 99 caller_wait->Signal(); |
99 return; | 100 return; |
100 } | 101 } |
101 | 102 |
102 // TODO(backer): This is coded for integrated GPUs. For discrete GPUs | 103 // TODO(backer): This is coded for integrated GPUs. For discrete GPUs |
103 // we would probably want to use a PBO texture upload for a true async | 104 // we would probably want to use a PBO texture upload for a true async |
104 // upload (that would hopefully be optimized as a DMA transfer by the | 105 // upload (that would hopefully be optimized as a DMA transfer by the |
105 // driver). | 106 // driver). |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 | 543 |
543 AsyncPixelTransferDelegate* | 544 AsyncPixelTransferDelegate* |
544 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl( | 545 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl( |
545 gles2::TextureRef* ref, | 546 gles2::TextureRef* ref, |
546 const AsyncTexImage2DParams& define_params) { | 547 const AsyncTexImage2DParams& define_params) { |
547 return new AsyncPixelTransferDelegateShareGroup( | 548 return new AsyncPixelTransferDelegateShareGroup( |
548 &shared_state_, ref->service_id(), define_params); | 549 &shared_state_, ref->service_id(), define_params); |
549 } | 550 } |
550 | 551 |
551 } // namespace gpu | 552 } // namespace gpu |
OLD | NEW |