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

Side by Side Diff: gpu/command_buffer/client/gl_in_process_context.cc

Issue 1385883002: Leave CreateStreamTexture route id out of the GL interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing TOT! Created 5 years, 1 month 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
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/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // GLInProcessContext implementation: 66 // GLInProcessContext implementation:
67 void SetContextLostCallback(const base::Closure& callback) override; 67 void SetContextLostCallback(const base::Closure& callback) override;
68 gles2::GLES2Implementation* GetImplementation() override; 68 gles2::GLES2Implementation* GetImplementation() override;
69 size_t GetMappedMemoryLimit() override; 69 size_t GetMappedMemoryLimit() override;
70 void SetLock(base::Lock* lock) override; 70 void SetLock(base::Lock* lock) override;
71 71
72 #if defined(OS_ANDROID) 72 #if defined(OS_ANDROID)
73 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( 73 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(
74 uint32 stream_id) override; 74 uint32 stream_id) override;
75 uint32 CreateStreamTexture(uint32 texture_id) override;
75 #endif 76 #endif
76 77
77 private: 78 private:
78 void Destroy(); 79 void Destroy();
79 void OnContextLost(); 80 void OnContextLost();
80 void OnSignalSyncPoint(const base::Closure& callback); 81 void OnSignalSyncPoint(const base::Closure& callback);
81 82
82 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; 83 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_;
83 scoped_ptr<TransferBuffer> transfer_buffer_; 84 scoped_ptr<TransferBuffer> transfer_buffer_;
84 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; 85 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 transfer_buffer_.reset(); 260 transfer_buffer_.reset();
260 gles2_helper_.reset(); 261 gles2_helper_.reset();
261 command_buffer_.reset(); 262 command_buffer_.reset();
262 } 263 }
263 264
264 #if defined(OS_ANDROID) 265 #if defined(OS_ANDROID)
265 scoped_refptr<gfx::SurfaceTexture> 266 scoped_refptr<gfx::SurfaceTexture>
266 GLInProcessContextImpl::GetSurfaceTexture(uint32 stream_id) { 267 GLInProcessContextImpl::GetSurfaceTexture(uint32 stream_id) {
267 return command_buffer_->GetSurfaceTexture(stream_id); 268 return command_buffer_->GetSurfaceTexture(stream_id);
268 } 269 }
270
271 uint32 GLInProcessContextImpl::CreateStreamTexture(uint32 texture_id) {
272 return command_buffer_->CreateStreamTexture(texture_id);
273 }
269 #endif 274 #endif
270 275
271 } // anonymous namespace 276 } // anonymous namespace
272 277
273 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits() 278 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits()
274 : command_buffer_size(kDefaultCommandBufferSize), 279 : command_buffer_size(kDefaultCommandBufferSize),
275 start_transfer_buffer_size(kDefaultStartTransferBufferSize), 280 start_transfer_buffer_size(kDefaultStartTransferBufferSize),
276 min_transfer_buffer_size(kDefaultMinTransferBufferSize), 281 min_transfer_buffer_size(kDefaultMinTransferBufferSize),
277 max_transfer_buffer_size(kDefaultMaxTransferBufferSize), 282 max_transfer_buffer_size(kDefaultMaxTransferBufferSize),
278 mapped_memory_reclaim_limit(gles2::GLES2Implementation::kNoLimit) { 283 mapped_memory_reclaim_limit(gles2::GLES2Implementation::kNoLimit) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 gpu_preference, 316 gpu_preference,
312 service, 317 service,
313 gpu_memory_buffer_manager, 318 gpu_memory_buffer_manager,
314 image_factory)) 319 image_factory))
315 return NULL; 320 return NULL;
316 321
317 return context.release(); 322 return context.release();
318 } 323 }
319 324
320 } // namespace gpu 325 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.h ('k') | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698