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

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

Issue 1417853006: gpu: introduce glSetStreamTextureSizeCHROMIUM(GLuint texture, GLint stream_id, GLsizei width, GLsiz… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android_webview.test failure 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ImageFactory* image_factory); 64 ImageFactory* image_factory);
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 int32 stream_id) override;
75 #endif 75 #endif
76 76
77 private: 77 private:
78 void Destroy(); 78 void Destroy();
79 void OnContextLost(); 79 void OnContextLost();
80 void OnSignalSyncPoint(const base::Closure& callback); 80 void OnSignalSyncPoint(const base::Closure& callback);
81 81
82 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; 82 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_;
83 scoped_ptr<TransferBuffer> transfer_buffer_; 83 scoped_ptr<TransferBuffer> transfer_buffer_;
84 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; 84 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 gles2_implementation_.reset(); 256 gles2_implementation_.reset();
257 } 257 }
258 258
259 transfer_buffer_.reset(); 259 transfer_buffer_.reset();
260 gles2_helper_.reset(); 260 gles2_helper_.reset();
261 command_buffer_.reset(); 261 command_buffer_.reset();
262 } 262 }
263 263
264 #if defined(OS_ANDROID) 264 #if defined(OS_ANDROID)
265 scoped_refptr<gfx::SurfaceTexture> 265 scoped_refptr<gfx::SurfaceTexture> GLInProcessContextImpl::GetSurfaceTexture(
266 GLInProcessContextImpl::GetSurfaceTexture(uint32 stream_id) { 266 int32 stream_id) {
267 return command_buffer_->GetSurfaceTexture(stream_id); 267 return command_buffer_->GetSurfaceTexture(stream_id);
268 } 268 }
269 #endif 269 #endif
270 270
271 } // anonymous namespace 271 } // anonymous namespace
272 272
273 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits() 273 GLInProcessContextSharedMemoryLimits::GLInProcessContextSharedMemoryLimits()
274 : command_buffer_size(kDefaultCommandBufferSize), 274 : command_buffer_size(kDefaultCommandBufferSize),
275 start_transfer_buffer_size(kDefaultStartTransferBufferSize), 275 start_transfer_buffer_size(kDefaultStartTransferBufferSize),
276 min_transfer_buffer_size(kDefaultMinTransferBufferSize), 276 min_transfer_buffer_size(kDefaultMinTransferBufferSize),
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 gpu_preference, 311 gpu_preference,
312 service, 312 service,
313 gpu_memory_buffer_manager, 313 gpu_memory_buffer_manager,
314 image_factory)) 314 image_factory))
315 return NULL; 315 return NULL;
316 316
317 return context.release(); 317 return context.release();
318 } 318 }
319 319
320 } // namespace gpu 320 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698