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

Side by Side Diff: components/mus/public/cpp/lib/command_buffer_client_impl.cc

Issue 1974163003: Expose GpuMemoryBufferId through glGetImageivCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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 "components/mus/public/cpp/lib/command_buffer_client_impl.h" 5 #include "components/mus/public/cpp/lib/command_buffer_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 mus::MojoGpuMemoryBufferImpl::Create( 264 mus::MojoGpuMemoryBufferImpl::Create(
265 gfx::Size(static_cast<int>(width), static_cast<int>(height)), 265 gfx::Size(static_cast<int>(width), static_cast<int>(height)),
266 gpu::DefaultBufferFormatForImageFormat(internalformat), 266 gpu::DefaultBufferFormatForImageFormat(internalformat),
267 gfx::BufferUsage::SCANOUT)); 267 gfx::BufferUsage::SCANOUT));
268 if (!buffer) 268 if (!buffer)
269 return -1; 269 return -1;
270 270
271 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); 271 return CreateImage(buffer->AsClientBuffer(), width, height, internalformat);
272 } 272 }
273 273
274 int32_t CommandBufferClientImpl::GetImageGpuMemoryBufferId(unsigned image_id) {
275 NOTIMPLEMENTED();
piman 2016/05/26 21:16:07 ditto?
erikchen 2016/05/26 21:41:27 Done.
276 return -1;
277 }
278
274 void CommandBufferClientImpl::SignalQuery(uint32_t query, 279 void CommandBufferClientImpl::SignalQuery(uint32_t query,
275 const base::Closure& callback) { 280 const base::Closure& callback) {
276 // TODO(piman) 281 // TODO(piman)
277 NOTIMPLEMENTED(); 282 NOTIMPLEMENTED();
278 } 283 }
279 284
280 void CommandBufferClientImpl::Destroyed(int32_t lost_reason, int32_t error) { 285 void CommandBufferClientImpl::Destroyed(int32_t lost_reason, int32_t error) {
281 if (destroyed_) 286 if (destroyed_)
282 return; 287 return;
283 last_state_.context_lost_reason = 288 last_state_.context_lost_reason =
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 374
370 // It is also safe to wait on the same context. 375 // It is also safe to wait on the same context.
371 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && 376 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO &&
372 sync_token->command_buffer_id() == GetCommandBufferID()) 377 sync_token->command_buffer_id() == GetCommandBufferID())
373 return true; 378 return true;
374 379
375 return false; 380 return false;
376 } 381 }
377 382
378 } // namespace mus 383 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698