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

Side by Side Diff: mojo/gles2/command_buffer_client_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
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | ui/gfx/buffer_types.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/gles2/command_buffer_client_impl.h" 5 #include "mojo/gles2/command_buffer_client_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 int32_t CommandBufferClientImpl::CreateGpuMemoryBufferImage( 316 int32_t CommandBufferClientImpl::CreateGpuMemoryBufferImage(
317 size_t width, 317 size_t width,
318 size_t height, 318 size_t height,
319 unsigned internalformat, 319 unsigned internalformat,
320 unsigned usage) { 320 unsigned usage) {
321 scoped_ptr<gfx::GpuMemoryBuffer> buffer(mus::MojoGpuMemoryBufferImpl::Create( 321 scoped_ptr<gfx::GpuMemoryBuffer> buffer(mus::MojoGpuMemoryBufferImpl::Create(
322 gfx::Size(static_cast<int>(width), static_cast<int>(height)), 322 gfx::Size(static_cast<int>(width), static_cast<int>(height)),
323 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat), 323 gpu::ImageFactory::DefaultBufferFormatForImageFormat(internalformat),
324 gfx::BufferUsage::GPU_READ_WRITE)); 324 gfx::BufferUsage::SCANOUT));
325 if (!buffer) 325 if (!buffer)
326 return -1; 326 return -1;
327 327
328 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); 328 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat);
329 } 329 }
330 330
331 uint32_t CommandBufferClientImpl::InsertSyncPoint() { 331 uint32_t CommandBufferClientImpl::InsertSyncPoint() {
332 command_buffer_->InsertSyncPoint(true); 332 command_buffer_->InsertSyncPoint(true);
333 return sync_point_client_impl_->WaitForInsertSyncPoint(); 333 return sync_point_client_impl_->WaitForInsertSyncPoint();
334 } 334 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // TODO(dyen) 433 // TODO(dyen)
434 } 434 }
435 435
436 bool CommandBufferClientImpl::CanWaitUnverifiedSyncToken( 436 bool CommandBufferClientImpl::CanWaitUnverifiedSyncToken(
437 const gpu::SyncToken* sync_token) { 437 const gpu::SyncToken* sync_token) {
438 // All sync tokens must be flushed before being waited on. 438 // All sync tokens must be flushed before being waited on.
439 return false; 439 return false;
440 } 440 }
441 441
442 } // namespace gles2 442 } // namespace gles2
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | ui/gfx/buffer_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698