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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 132473004: aura: Remove sync point methods from ImageTransportFactory api. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « content/browser/aura/no_transport_image_transport_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 7f690e31fd089574505bb2c1d81f782913598ce0..38f21b0ad3afa5dbff1ddbe7771cd1c6c99098db 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -323,13 +323,14 @@ void SendCompositorFrameAck(
ack.gl_frame_data.reset(new cc::GLFrameData());
DCHECK(!texture_to_produce.get() || !skip_frame);
if (texture_to_produce.get()) {
+ GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper();
std::string mailbox_name = texture_to_produce->Produce();
std::copy(mailbox_name.data(),
mailbox_name.data() + mailbox_name.length(),
reinterpret_cast<char*>(ack.gl_frame_data->mailbox.name));
ack.gl_frame_data->size = texture_to_produce->size();
ack.gl_frame_data->sync_point =
- content::ImageTransportFactory::GetInstance()->InsertSyncPoint();
+ gl_helper ? gl_helper->InsertSyncPoint() : 0;
} else if (skip_frame) {
// Skip the frame, i.e. tell the producer to reuse the same buffer that
// we just received.
@@ -351,9 +352,9 @@ void AcknowledgeBufferForGpu(
uint32 sync_point = 0;
DCHECK(!texture_to_produce.get() || !skip_frame);
if (texture_to_produce.get()) {
+ GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper();
ack.mailbox_name = texture_to_produce->Produce();
- sync_point =
- content::ImageTransportFactory::GetInstance()->InsertSyncPoint();
+ sync_point = gl_helper ? gl_helper->InsertSyncPoint() : 0;
} else if (skip_frame) {
ack.mailbox_name = received_mailbox;
ack.sync_point = 0;
@@ -1638,8 +1639,8 @@ void RenderWidgetHostViewAura::OnSwapCompositorFrame(
return;
}
- ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
- factory->WaitSyncPoint(frame->gl_frame_data->sync_point);
+ GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper();
+ gl_helper->WaitSyncPoint(frame->gl_frame_data->sync_point);
std::string mailbox_name(
reinterpret_cast<const char*>(frame->gl_frame_data->mailbox.name),
« no previous file with comments | « content/browser/aura/no_transport_image_transport_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698