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

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

Issue 2431753002: Mus experiment in content shell on Android.
Patch Set: Fix mac bot 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 2eda8f167e553da16b7760fdeaebfca389940bc0..8960274927c3da5b01968978715cc1faaf832c1d 100644
--- a/services/ui/surfaces/surfaces_context_provider.cc
+++ b/services/ui/surfaces/surfaces_context_provider.cc
@@ -20,6 +20,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"
@@ -45,8 +46,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(
« no previous file with comments | « services/ui/surfaces/BUILD.gn ('k') | ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698