OLD | NEW |
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/command_buffer/client/gl_in_process_context.h" | 5 #include "gpu/command_buffer/client/gl_in_process_context.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const scoped_refptr<InProcessCommandBuffer::Service>& service, | 61 const scoped_refptr<InProcessCommandBuffer::Service>& service, |
62 GpuMemoryBufferManager* gpu_memory_buffer_manager, | 62 GpuMemoryBufferManager* gpu_memory_buffer_manager, |
63 ImageFactory* image_factory); | 63 ImageFactory* image_factory); |
64 | 64 |
65 // GLInProcessContext implementation: | 65 // GLInProcessContext implementation: |
66 void SetContextLostCallback(const base::Closure& callback) override; | 66 void SetContextLostCallback(const base::Closure& callback) override; |
67 gles2::GLES2Implementation* GetImplementation() override; | 67 gles2::GLES2Implementation* GetImplementation() override; |
68 size_t GetMappedMemoryLimit() override; | 68 size_t GetMappedMemoryLimit() override; |
69 | 69 |
70 #if defined(OS_ANDROID) | 70 #if defined(OS_ANDROID) |
71 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 71 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
72 uint32 stream_id) override; | 72 uint32 stream_id) override; |
73 #endif | 73 #endif |
74 | 74 |
75 private: | 75 private: |
76 void Destroy(); | 76 void Destroy(); |
77 void OnContextLost(); | 77 void OnContextLost(); |
78 void OnSignalSyncPoint(const base::Closure& callback); | 78 void OnSignalSyncPoint(const base::Closure& callback); |
79 | 79 |
80 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; | 80 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; |
81 scoped_ptr<TransferBuffer> transfer_buffer_; | 81 scoped_ptr<TransferBuffer> transfer_buffer_; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 gpu_preference, | 300 gpu_preference, |
301 service, | 301 service, |
302 gpu_memory_buffer_manager, | 302 gpu_memory_buffer_manager, |
303 image_factory)) | 303 image_factory)) |
304 return NULL; | 304 return NULL; |
305 | 305 |
306 return context.release(); | 306 return context.release(); |
307 } | 307 } |
308 | 308 |
309 } // namespace gpu | 309 } // namespace gpu |
OLD | NEW |