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

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

Issue 1068663002: gpu: More specific internalformat requirements for CreateImageCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 "content/common/gpu/client/command_buffer_proxy_impl.h" 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 DCHECK(gpu_memory_buffer); 366 DCHECK(gpu_memory_buffer);
367 367
368 // This handle is owned by the GPU process and must be passed to it or it 368 // This handle is owned by the GPU process and must be passed to it or it
369 // will leak. In otherwords, do not early out on error between here and the 369 // will leak. In otherwords, do not early out on error between here and the
370 // sending of the CreateImage IPC below. 370 // sending of the CreateImage IPC below.
371 bool requires_sync_point = false; 371 bool requires_sync_point = false;
372 gfx::GpuMemoryBufferHandle handle = 372 gfx::GpuMemoryBufferHandle handle =
373 channel_->ShareGpuMemoryBufferToGpuProcess(gpu_memory_buffer->GetHandle(), 373 channel_->ShareGpuMemoryBufferToGpuProcess(gpu_memory_buffer->GetHandle(),
374 &requires_sync_point); 374 &requires_sync_point);
375 375
376 DCHECK(gpu::ImageFactory::IsGpuMemoryBufferFormatSupported(
377 gpu_memory_buffer->GetFormat(), capabilities_));
376 DCHECK(gpu::ImageFactory::IsImageSizeValidForGpuMemoryBufferFormat( 378 DCHECK(gpu::ImageFactory::IsImageSizeValidForGpuMemoryBufferFormat(
377 gfx::Size(width, height), gpu_memory_buffer->GetFormat())); 379 gfx::Size(width, height), gpu_memory_buffer->GetFormat()));
378 DCHECK(gpu::ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat( 380 DCHECK(gpu::ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
379 internalformat, gpu_memory_buffer->GetFormat())); 381 internalformat, gpu_memory_buffer->GetFormat()));
380 if (!Send(new GpuCommandBufferMsg_CreateImage(route_id_, 382 if (!Send(new GpuCommandBufferMsg_CreateImage(route_id_,
381 new_id, 383 new_id,
382 handle, 384 handle,
383 gfx::Size(width, height), 385 gfx::Size(width, height),
384 gpu_memory_buffer->GetFormat(), 386 gpu_memory_buffer->GetFormat(),
385 internalformat))) { 387 internalformat))) {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 608 }
607 } 609 }
608 610
609 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, 611 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase,
610 base::TimeDelta interval) { 612 base::TimeDelta interval) {
611 if (!update_vsync_parameters_completion_callback_.is_null()) 613 if (!update_vsync_parameters_completion_callback_.is_null())
612 update_vsync_parameters_completion_callback_.Run(timebase, interval); 614 update_vsync_parameters_completion_callback_.Run(timebase, interval);
613 } 615 }
614 616
615 } // namespace content 617 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_texture_wrapper.cc ('k') | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698