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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 180723023: gpu: Mailbox emulation with EGLImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index c185aa99678693f939d398c8e6207e615d380330..dd598387260ec3f5c6dbce794f9c2f5b4f150e8c 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -30,6 +30,7 @@
#include "gpu/command_buffer/service/gpu_control_service.h"
#include "gpu/command_buffer/service/gpu_scheduler.h"
#include "gpu/command_buffer/service/image_manager.h"
+#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/transfer_buffer_manager.h"
#include "ui/gfx/size.h"
#include "ui/gl/gl_context.h"
@@ -172,10 +173,6 @@ bool WaitSyncPoint(uint32 sync_point) {
return true;
}
-void RetireSyncPoint(uint32 sync_point) {
- g_sync_point_manager.Get().RetireSyncPoint(sync_point);
-}
-
} // anonyous namespace
InProcessCommandBuffer::Service::Service() {}
@@ -621,10 +618,20 @@ void InProcessCommandBuffer::DestroyGpuMemoryBuffer(int32 id) {
uint32 InProcessCommandBuffer::InsertSyncPoint() {
uint32 sync_point = g_sync_point_manager.Get().GenerateSyncPoint();
- QueueTask(base::Bind(&RetireSyncPoint, sync_point));
+ QueueTask(base::Bind(&InProcessCommandBuffer::RetireSyncPointOnGpuThread,
+ base::Unretained(this),
+ sync_point));
return sync_point;
}
+void InProcessCommandBuffer::RetireSyncPointOnGpuThread(uint32 sync_point) {
+ gles2::MailboxManager* mailbox_manager =
+ decoder_->GetContextGroup()->mailbox_manager();
+ if (mailbox_manager->UsesSync() && MakeCurrent())
+ mailbox_manager->PushTextureUpdates();
+ g_sync_point_manager.Get().RetireSyncPoint(sync_point);
+}
+
void InProcessCommandBuffer::SignalSyncPoint(unsigned sync_point,
const base::Closure& callback) {
CheckSequencedThread();
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/service/mailbox_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698