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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 186123006: zero copy - NOT FOR REVIEW Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minus ui-map-image and ui-impl-side setting, plus tiled mode Created 6 years, 9 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/gpu/client/gpu_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 #endif 271 #endif
272 } 272 }
273 273
274 int32 GpuChannelHost::ReserveTransferBufferId() { 274 int32 GpuChannelHost::ReserveTransferBufferId() {
275 return next_transfer_buffer_id_.GetNext(); 275 return next_transfer_buffer_id_.GetNext();
276 } 276 }
277 277
278 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess( 278 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess(
279 gfx::GpuMemoryBufferHandle source_handle) { 279 gfx::GpuMemoryBufferHandle source_handle) {
280 switch (source_handle.type) { 280 switch (source_handle.type) {
281 case gfx::FOOBAR_BUFFER:
281 case gfx::SHARED_MEMORY_BUFFER: { 282 case gfx::SHARED_MEMORY_BUFFER: {
282 gfx::GpuMemoryBufferHandle handle; 283 gfx::GpuMemoryBufferHandle handle;
283 handle.type = gfx::SHARED_MEMORY_BUFFER; 284 handle.type = source_handle.type;
284 handle.handle = ShareToGpuProcess(source_handle.handle); 285 handle.handle = ShareToGpuProcess(source_handle.handle);
285 return handle; 286 return handle;
286 } 287 }
287 #if defined(OS_MACOSX) 288 #if defined(OS_MACOSX)
288 case gfx::IO_SURFACE_BUFFER: 289 case gfx::IO_SURFACE_BUFFER:
289 return source_handle; 290 return source_handle;
290 #endif 291 #endif
291 default: 292 default:
292 NOTREACHED(); 293 NOTREACHED();
293 return gfx::GpuMemoryBufferHandle(); 294 return gfx::GpuMemoryBufferHandle();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 371
371 listeners_.clear(); 372 listeners_.clear();
372 } 373 }
373 374
374 bool GpuChannelHost::MessageFilter::IsLost() const { 375 bool GpuChannelHost::MessageFilter::IsLost() const {
375 AutoLock lock(lock_); 376 AutoLock lock(lock_);
376 return lost_; 377 return lost_;
377 } 378 }
378 379
379 } // namespace content 380 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_foobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698