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

Side by Side Diff: services/ui/gles2/command_buffer_local.cc

Issue 2134793002: Remove the command buffer method glGetImageivCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge conflict. Created 4 years, 5 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 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 "services/ui/gles2/command_buffer_local.h" 5 #include "services/ui/gles2/command_buffer_local.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 DCHECK_EQ(usage, static_cast<unsigned>(GL_READ_WRITE_CHROMIUM)); 292 DCHECK_EQ(usage, static_cast<unsigned>(GL_READ_WRITE_CHROMIUM));
293 std::unique_ptr<gfx::GpuMemoryBuffer> buffer(MojoGpuMemoryBufferImpl::Create( 293 std::unique_ptr<gfx::GpuMemoryBuffer> buffer(MojoGpuMemoryBufferImpl::Create(
294 gfx::Size(static_cast<int>(width), static_cast<int>(height)), 294 gfx::Size(static_cast<int>(width), static_cast<int>(height)),
295 gpu::DefaultBufferFormatForImageFormat(internal_format), 295 gpu::DefaultBufferFormatForImageFormat(internal_format),
296 gfx::BufferUsage::SCANOUT)); 296 gfx::BufferUsage::SCANOUT));
297 if (!buffer) 297 if (!buffer)
298 return -1; 298 return -1;
299 return CreateImage(buffer->AsClientBuffer(), width, height, internal_format); 299 return CreateImage(buffer->AsClientBuffer(), width, height, internal_format);
300 } 300 }
301 301
302 int32_t CommandBufferLocal::GetImageGpuMemoryBufferId(unsigned image_id) {
303 // TODO(erikchen): Once this class supports IOSurface GpuMemoryBuffer backed
304 // images, it will also need to keep a local cache from image id to
305 // GpuMemoryBuffer id.
306 NOTIMPLEMENTED();
307 return -1;
308 }
309
310 void CommandBufferLocal::SignalQuery(uint32_t query_id, 302 void CommandBufferLocal::SignalQuery(uint32_t query_id,
311 const base::Closure& callback) { 303 const base::Closure& callback) {
312 DCHECK(CalledOnValidThread()); 304 DCHECK(CalledOnValidThread());
313 305
314 gpu_state_->command_buffer_task_runner()->PostTask( 306 gpu_state_->command_buffer_task_runner()->PostTask(
315 driver_.get(), base::Bind(&CommandBufferLocal::SignalQueryOnGpuThread, 307 driver_.get(), base::Bind(&CommandBufferLocal::SignalQueryOnGpuThread,
316 base::Unretained(this), query_id, callback)); 308 base::Unretained(this), query_id, callback));
317 } 309 }
318 310
319 void CommandBufferLocal::SetLock(base::Lock* lock) { 311 void CommandBufferLocal::SetLock(base::Lock* lock) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 client_->UpdateVSyncParameters(timebase, interval); 559 client_->UpdateVSyncParameters(timebase, interval);
568 } 560 }
569 561
570 void CommandBufferLocal::OnGpuCompletedSwapBuffersOnClientThread( 562 void CommandBufferLocal::OnGpuCompletedSwapBuffersOnClientThread(
571 gfx::SwapResult result) { 563 gfx::SwapResult result) {
572 if (client_) 564 if (client_)
573 client_->GpuCompletedSwapBuffers(result); 565 client_->GpuCompletedSwapBuffers(result);
574 } 566 }
575 567
576 } // namespace ui 568 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/gles2/command_buffer_local.h ('k') | services/ui/public/cpp/lib/command_buffer_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698