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

Side by Side Diff: gpu/command_buffer/service/in_process_command_buffer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/command_buffer/service/in_process_command_buffer.h" 5 #include "gpu/command_buffer/service/in_process_command_buffer.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 size_t height, 762 size_t height,
763 unsigned internalformat, 763 unsigned internalformat,
764 unsigned usage) { 764 unsigned usage) {
765 CheckSequencedThread(); 765 CheckSequencedThread();
766 766
767 DCHECK(gpu_memory_buffer_manager_); 767 DCHECK(gpu_memory_buffer_manager_);
768 scoped_ptr<gfx::GpuMemoryBuffer> buffer( 768 scoped_ptr<gfx::GpuMemoryBuffer> buffer(
769 gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer( 769 gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer(
770 gfx::Size(width, height), 770 gfx::Size(width, height),
771 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat), 771 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat),
772 gfx::BufferUsage::GPU_READ_WRITE)); 772 gfx::BufferUsage::SCANOUT));
773 if (!buffer) 773 if (!buffer)
774 return -1; 774 return -1;
775 775
776 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); 776 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat);
777 } 777 }
778 778
779 uint32 InProcessCommandBuffer::InsertSyncPoint() { 779 uint32 InProcessCommandBuffer::InsertSyncPoint() {
780 uint32 sync_point = service_->sync_point_manager()->GenerateSyncPoint(); 780 uint32 sync_point = service_->sync_point_manager()->GenerateSyncPoint();
781 QueueTask(base::Bind(&InProcessCommandBuffer::RetireSyncPointOnGpuThread, 781 QueueTask(base::Bind(&InProcessCommandBuffer::RetireSyncPointOnGpuThread,
782 base::Unretained(this), 782 base::Unretained(this),
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 framebuffer_completeness_cache_ = 1083 framebuffer_completeness_cache_ =
1084 new gpu::gles2::FramebufferCompletenessCache; 1084 new gpu::gles2::FramebufferCompletenessCache;
1085 return framebuffer_completeness_cache_; 1085 return framebuffer_completeness_cache_;
1086 } 1086 }
1087 1087
1088 SyncPointManager* GpuInProcessThread::sync_point_manager() { 1088 SyncPointManager* GpuInProcessThread::sync_point_manager() {
1089 return sync_point_manager_; 1089 return sync_point_manager_;
1090 } 1090 }
1091 1091
1092 } // namespace gpu 1092 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/gpu_memory_buffer_impl_test_template.h ('k') | mojo/gles2/command_buffer_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698