summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r--gpu/command_buffer/service/gpu_processor.h2
-rw-r--r--gpu/command_buffer/service/gpu_processor_mac.cc6
2 files changed, 8 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gpu_processor.h b/gpu/command_buffer/service/gpu_processor.h
index 79d9e73..986ab03 100644
--- a/gpu/command_buffer/service/gpu_processor.h
+++ b/gpu/command_buffer/service/gpu_processor.h
@@ -83,6 +83,8 @@ class GPUProcessor : public CommandBufferEngine {
virtual void SetTransportDIBAllocAndFree(
Callback2<size_t, TransportDIB::Handle*>::Type* allocator,
Callback1<TransportDIB::Id>::Type* deallocator);
+ // Returns the id of the current IOSurface, or 0.
+ virtual uint64 GetSurfaceId();
#endif
// Sets a callback which is called when a SwapBuffers command is processed.
diff --git a/gpu/command_buffer/service/gpu_processor_mac.cc b/gpu/command_buffer/service/gpu_processor_mac.cc
index 17dee69..99721e9 100644
--- a/gpu/command_buffer/service/gpu_processor_mac.cc
+++ b/gpu/command_buffer/service/gpu_processor_mac.cc
@@ -93,6 +93,12 @@ void GPUProcessor::SetTransportDIBAllocAndFree(
surface_->SetTransportDIBAllocAndFree(allocator, deallocator);
}
+uint64 GPUProcessor::GetSurfaceId() {
+ if (!surface_.get())
+ return 0;
+ return surface_->GetSurfaceId();
+}
+
void GPUProcessor::WillSwapBuffers() {
DCHECK(decoder_.get());
DCHECK(decoder_->GetGLContext());