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

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

Issue 1403283007: Re-land: ui: Add custom stride support to GLImageMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more missing static_casts 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 "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/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess( 366 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess(
367 const gfx::GpuMemoryBufferHandle& source_handle, 367 const gfx::GpuMemoryBufferHandle& source_handle,
368 bool* requires_sync_point) { 368 bool* requires_sync_point) {
369 switch (source_handle.type) { 369 switch (source_handle.type) {
370 case gfx::SHARED_MEMORY_BUFFER: { 370 case gfx::SHARED_MEMORY_BUFFER: {
371 gfx::GpuMemoryBufferHandle handle; 371 gfx::GpuMemoryBufferHandle handle;
372 handle.type = gfx::SHARED_MEMORY_BUFFER; 372 handle.type = gfx::SHARED_MEMORY_BUFFER;
373 handle.handle = ShareToGpuProcess(source_handle.handle); 373 handle.handle = ShareToGpuProcess(source_handle.handle);
374 handle.offset = source_handle.offset; 374 handle.offset = source_handle.offset;
375 handle.stride = source_handle.stride;
375 *requires_sync_point = false; 376 *requires_sync_point = false;
376 return handle; 377 return handle;
377 } 378 }
378 case gfx::IO_SURFACE_BUFFER: 379 case gfx::IO_SURFACE_BUFFER:
379 case gfx::SURFACE_TEXTURE_BUFFER: 380 case gfx::SURFACE_TEXTURE_BUFFER:
380 case gfx::OZONE_NATIVE_PIXMAP: 381 case gfx::OZONE_NATIVE_PIXMAP:
381 *requires_sync_point = true; 382 *requires_sync_point = true;
382 return source_handle; 383 return source_handle;
383 default: 384 default:
384 NOTREACHED(); 385 NOTREACHED();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 527
527 listeners_.clear(); 528 listeners_.clear();
528 } 529 }
529 530
530 bool GpuChannelHost::MessageFilter::IsLost() const { 531 bool GpuChannelHost::MessageFilter::IsLost() const {
531 AutoLock lock(lock_); 532 AutoLock lock(lock_);
532 return lost_; 533 return lost_;
533 } 534 }
534 535
535 } // namespace content 536 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698