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

Side by Side Diff: content/common/child_process_host_impl.cc

Issue 177953004: Enable SurfaceTexture based zero-copy texture uploading on Android platform Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 months 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 "content/common/child_process_host_impl.h" 5 #include "content/common/child_process_host_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 void ChildProcessHostImpl::OnShutdownRequest() { 301 void ChildProcessHostImpl::OnShutdownRequest() {
302 if (delegate_->CanShutdown()) 302 if (delegate_->CanShutdown())
303 Send(new ChildProcessMsg_Shutdown()); 303 Send(new ChildProcessMsg_Shutdown());
304 } 304 }
305 305
306 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer( 306 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer(
307 uint32 width, 307 uint32 width,
308 uint32 height, 308 uint32 height,
309 uint32 internalformat, 309 uint32 internalformat,
310 gfx::GpuMemoryBufferHandle* handle) { 310 gfx::GpuMemoryBufferHandle* handle) {
311 handle->type = gfx::SHARED_MEMORY_BUFFER; 311 // TODO(jun.a.jiang): simply set the type to gfx::SURFACE_TEXTURE_BUFFER
312 AllocateSharedMemory( 312 // here and more is needed when this code snippet is reached.
313 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat), 313 handle->type = gfx::SURFACE_TEXTURE_BUFFER;
314 peer_handle_,
315 &handle->handle);
316 } 314 }
317 315
318 } // namespace content 316 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698