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

Side by Side Diff: gpu/ipc/client/command_buffer_proxy_impl.cc

Issue 2786103003: Add half-float IOSurface GpuMemoryBuffer support (Closed)
Patch Set: Review feedback Created 3 years, 8 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 "gpu/ipc/client/command_buffer_proxy_impl.h" 5 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 bool requires_sync_token = handle.type == gfx::IO_SURFACE_BUFFER; 508 bool requires_sync_token = handle.type == gfx::IO_SURFACE_BUFFER;
509 509
510 uint64_t image_fence_sync = 0; 510 uint64_t image_fence_sync = 0;
511 if (requires_sync_token) { 511 if (requires_sync_token) {
512 image_fence_sync = GenerateFenceSyncRelease(); 512 image_fence_sync = GenerateFenceSyncRelease();
513 513
514 // Make sure fence syncs were flushed before CreateImage() was called. 514 // Make sure fence syncs were flushed before CreateImage() was called.
515 DCHECK_EQ(image_fence_sync, flushed_fence_sync_release_ + 1); 515 DCHECK_EQ(image_fence_sync, flushed_fence_sync_release_ + 1);
516 } 516 }
517 517
518 DCHECK(gpu::IsGpuMemoryBufferFormatSupported(gpu_memory_buffer->GetFormat(), 518 DCHECK(gpu::IsImageFromGpuMemoryBufferFormatSupported(
519 capabilities_)); 519 gpu_memory_buffer->GetFormat(), capabilities_));
520 DCHECK(gpu::IsImageSizeValidForGpuMemoryBufferFormat( 520 DCHECK(gpu::IsImageSizeValidForGpuMemoryBufferFormat(
521 gfx::Size(width, height), gpu_memory_buffer->GetFormat())); 521 gfx::Size(width, height), gpu_memory_buffer->GetFormat()));
522 DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat( 522 DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
523 internal_format, gpu_memory_buffer->GetFormat())); 523 internal_format, gpu_memory_buffer->GetFormat()));
524 524
525 GpuCommandBufferMsg_CreateImage_Params params; 525 GpuCommandBufferMsg_CreateImage_Params params;
526 params.id = new_id; 526 params.id = new_id;
527 params.gpu_memory_buffer = handle; 527 params.gpu_memory_buffer = handle;
528 params.size = gfx::Size(width, height); 528 params.size = gfx::Size(width, height);
529 params.format = gpu_memory_buffer->GetFormat(); 529 params.format = gpu_memory_buffer->GetFormat();
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 return; 947 return;
948 channel_->FlushPendingStream(stream_id_); 948 channel_->FlushPendingStream(stream_id_);
949 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); 949 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_));
950 channel_->RemoveRoute(route_id_); 950 channel_->RemoveRoute(route_id_);
951 channel_ = nullptr; 951 channel_ = nullptr;
952 if (gpu_control_client_) 952 if (gpu_control_client_)
953 gpu_control_client_->OnGpuControlLostContext(); 953 gpu_control_client_->OnGpuControlLostContext();
954 } 954 }
955 955
956 } // namespace gpu 956 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698