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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 1429213002: Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content_unittests 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index b82d71532e5a9a0879be76493202502f2bb2c20e..82f987e3f5ee4fb5f8a22f3614d7068b8e7e1d88 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -1107,12 +1107,15 @@ void GpuCommandBufferStub::OnWaitFenceSyncCompleted(
scheduler_->SetScheduled(true);
}
-void GpuCommandBufferStub::OnCreateImage(int32 id,
- gfx::GpuMemoryBufferHandle handle,
- gfx::Size size,
- gfx::BufferFormat format,
- uint32 internalformat) {
+void GpuCommandBufferStub::OnCreateImage(
+ const GpuCommandBufferMsg_CreateImage_Params& params) {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateImage");
+ const int32_t id = params.id;
+ const gfx::GpuMemoryBufferHandle& handle = params.gpu_memory_buffer;
+ const gfx::Size& size = params.size;
+ const gfx::BufferFormat& format = params.format;
+ const uint32_t internalformat = params.internalformat;
+ const uint64_t image_release_count = params.image_release_count;
if (!decoder_)
return;
@@ -1148,6 +1151,9 @@ void GpuCommandBufferStub::OnCreateImage(int32 id,
return;
image_manager->AddImage(image.get(), id);
+ if (image_release_count) {
+ sync_point_client_->ReleaseFenceSync(image_release_count);
+ }
}
void GpuCommandBufferStub::OnDestroyImage(int32 id) {

Powered by Google App Engine
This is Rietveld 408576698