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

Unified Diff: services/ui/surfaces/surfaces_context_provider.cc

Issue 2431753002: Mus experiment in content shell on Android.
Patch Set: checkdeps fix Created 4 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: services/ui/surfaces/surfaces_context_provider.cc
diff --git a/services/ui/surfaces/surfaces_context_provider.cc b/services/ui/surfaces/surfaces_context_provider.cc
index c2957b8ca473b813277f3cd89fbcc643234352c9..a3c48dbf22b7b02f7fdf6a944b1d9e89cf2d2de7 100644
--- a/services/ui/surfaces/surfaces_context_provider.cc
+++ b/services/ui/surfaces/surfaces_context_provider.cc
@@ -19,6 +19,7 @@
#include "gpu/command_buffer/client/transfer_buffer.h"
#include "gpu/ipc/client/command_buffer_proxy_impl.h"
#include "gpu/ipc/client/gpu_channel_host.h"
+#include "gpu/ipc/common/gpu_surface_tracker.h"
#include "services/ui/common/switches.h"
#include "services/ui/surfaces/surfaces_context_provider_delegate.h"
#include "ui/gl/gpu_preference.h"
@@ -44,8 +45,17 @@ SurfacesContextProvider::SurfacesContextProvider(
attributes.bind_generates_resource = false;
attributes.lose_context_when_out_of_memory = true;
GURL active_url;
+
+ gpu::SurfaceHandle surface_handle;
+#if defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
+ surface_handle = widget;
+#else
+ surface_handle =
+ gpu::GpuSurfaceTracker::Get()->AddSurfaceForNativeWidget(widget);
+#endif
+
command_buffer_proxy_impl_ = gpu::CommandBufferProxyImpl::Create(
- std::move(gpu_channel), widget, shared_command_buffer, stream_id,
+ std::move(gpu_channel), surface_handle, shared_command_buffer, stream_id,
stream_priority, attributes, active_url, task_runner_);
CHECK(command_buffer_proxy_impl_);
command_buffer_proxy_impl_->SetSwapBuffersCompletionCallback(

Powered by Google App Engine
This is Rietveld 408576698