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

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

Issue 1417753007: ui: Revert gfx::BufferUsage::SCANOUT to gfx::BufferUsage::GPU_READ_WRITE change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 int32_t CommandBufferProxyImpl::CreateGpuMemoryBufferImage( 455 int32_t CommandBufferProxyImpl::CreateGpuMemoryBufferImage(
456 size_t width, 456 size_t width,
457 size_t height, 457 size_t height,
458 unsigned internalformat, 458 unsigned internalformat,
459 unsigned usage) { 459 unsigned usage) {
460 CheckLock(); 460 CheckLock();
461 scoped_ptr<gfx::GpuMemoryBuffer> buffer( 461 scoped_ptr<gfx::GpuMemoryBuffer> buffer(
462 channel_->gpu_memory_buffer_manager()->AllocateGpuMemoryBuffer( 462 channel_->gpu_memory_buffer_manager()->AllocateGpuMemoryBuffer(
463 gfx::Size(width, height), 463 gfx::Size(width, height),
464 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat), 464 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat),
465 gfx::BufferUsage::GPU_READ_WRITE)); 465 gfx::BufferUsage::SCANOUT));
466 if (!buffer) 466 if (!buffer)
467 return -1; 467 return -1;
468 468
469 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); 469 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat);
470 } 470 }
471 471
472 uint32 CommandBufferProxyImpl::CreateStreamTexture(uint32 texture_id) { 472 uint32 CommandBufferProxyImpl::CreateStreamTexture(uint32 texture_id) {
473 CheckLock(); 473 CheckLock();
474 if (last_state_.error != gpu::error::kNoError) 474 if (last_state_.error != gpu::error::kNoError)
475 return 0; 475 return 0;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 738 }
739 } 739 }
740 740
741 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, 741 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase,
742 base::TimeDelta interval) { 742 base::TimeDelta interval) {
743 if (!update_vsync_parameters_completion_callback_.is_null()) 743 if (!update_vsync_parameters_completion_callback_.is_null())
744 update_vsync_parameters_completion_callback_.Run(timebase, interval); 744 update_vsync_parameters_completion_callback_.Run(timebase, interval);
745 } 745 }
746 746
747 } // namespace content 747 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698