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

Side by Side Diff: components/mus/gles2/command_buffer_local.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
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/gles2/command_buffer_local.h" 5 #include "components/mus/gles2/command_buffer_local.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "components/mus/gles2/command_buffer_local_client.h" 9 #include "components/mus/gles2/command_buffer_local_client.h"
10 #include "components/mus/gles2/gpu_memory_tracker.h" 10 #include "components/mus/gles2/gpu_memory_tracker.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 int32_t CommandBufferLocal::CreateGpuMemoryBufferImage(size_t width, 161 int32_t CommandBufferLocal::CreateGpuMemoryBufferImage(size_t width,
162 size_t height, 162 size_t height,
163 unsigned internalformat, 163 unsigned internalformat,
164 unsigned usage) { 164 unsigned usage) {
165 DCHECK_EQ(usage, static_cast<unsigned>(GL_READ_WRITE_CHROMIUM)); 165 DCHECK_EQ(usage, static_cast<unsigned>(GL_READ_WRITE_CHROMIUM));
166 scoped_ptr<gfx::GpuMemoryBuffer> buffer(MojoGpuMemoryBufferImpl::Create( 166 scoped_ptr<gfx::GpuMemoryBuffer> buffer(MojoGpuMemoryBufferImpl::Create(
167 gfx::Size(static_cast<int>(width), static_cast<int>(height)), 167 gfx::Size(static_cast<int>(width), static_cast<int>(height)),
168 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat), 168 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat),
169 gfx::BufferUsage::GPU_READ_WRITE)); 169 gfx::BufferUsage::SCANOUT));
170 if (!buffer) 170 if (!buffer)
171 return -1; 171 return -1;
172 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); 172 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat);
173 } 173 }
174 174
175 uint32_t CommandBufferLocal::InsertSyncPoint() { 175 uint32_t CommandBufferLocal::InsertSyncPoint() {
176 return 0; 176 return 0;
177 } 177 }
178 178
179 uint32_t CommandBufferLocal::InsertFutureSyncPoint() { 179 uint32_t CommandBufferLocal::InsertFutureSyncPoint() {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 void CommandBufferLocal::OnContextLost(uint32_t reason) { 328 void CommandBufferLocal::OnContextLost(uint32_t reason) {
329 if (client_) 329 if (client_)
330 client_->DidLoseContext(); 330 client_->DidLoseContext();
331 } 331 }
332 332
333 void CommandBufferLocal::OnSyncPointRetired() { 333 void CommandBufferLocal::OnSyncPointRetired() {
334 scheduler_->SetScheduled(true); 334 scheduler_->SetScheduled(true);
335 } 335 }
336 336
337 } // namespace mus 337 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698