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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 337303003: CARemoteLayer alive-ish (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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/renderer_host/render_widget_host_view_mac.h ('k') | content/common/gpu/gpu_messages.h » ('j') | 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_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index aa202cced95c8ebd868c9525be457e1d8d1aaf44..d60434ae6dcc82c61f92e7c9fdb75a58b61eab0f 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -450,6 +450,7 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
: render_widget_host_(RenderWidgetHostImpl::From(widget)),
text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
can_compose_inline_(true),
+ remote_context_id_(0),
pending_latency_info_delay_(0),
pending_latency_info_delay_weak_ptr_factory_(this),
backing_store_scale_factor_(1),
@@ -1665,6 +1666,20 @@ void RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped(
gpu_host_id,
compositing_iosurface_ ?
compositing_iosurface_->GetRendererID() : 0);
+
+
+ if (params.ca_context_id) {
+ if (params.ca_context_id != remote_context_id_) {
+ remote_context_id_ = params.ca_context_id;
+ CALayerHost* layer_host = [[CALayerHost alloc] init];
+ CHECK(layer_host);
+ [layer_host setContextId:remote_context_id_];
+ [background_layer_ addSublayer:layer_host];
+ }
+ SendPendingSwapAck();
+ return;
+ }
+
CompositorSwapBuffers(params.surface_handle,
params.size,
params.scale_factor,
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698