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

Unified Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2498053004: Add InProcessContextProvider and update InProcessCommandBuffer (Closed)
Patch Set: Add missing dep in blimp 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
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/compositor/test/in_process_context_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/in_process_context_factory.cc
diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc
index 42dd8b51c350b8115de56e86f054925bc811e745..4c4f5bef30a0688a87f3cd8da73f7cfa106433de 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -32,6 +32,10 @@
#include "ui/gl/gl_implementation.h"
#include "ui/gl/test/gl_surface_test_support.h"
+#if !defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
+#include "gpu/ipc/common/gpu_surface_tracker.h"
+#endif
+
namespace ui {
namespace {
@@ -166,10 +170,17 @@ void InProcessContextFactory::CreateCompositorFrameSink(
attribs.sample_buffers = 0;
attribs.fail_if_major_perf_caveat = false;
attribs.bind_generates_resource = false;
+ gpu::SurfaceHandle surface_handle = gpu::kNullSurfaceHandle;
+#if defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
+ surface_handle = compositor->widget();
+#else
+ gpu::GpuSurfaceTracker* tracker = gpu::GpuSurfaceTracker::Get();
+ surface_handle = tracker->AddSurfaceForNativeWidget(compositor->widget());
piman 2016/11/16 20:48:50 Should we remove in RemoveCompositor?
+#endif
scoped_refptr<InProcessContextProvider> context_provider =
InProcessContextProvider::Create(
attribs, shared_worker_context_provider_.get(),
- &gpu_memory_buffer_manager_, &image_factory_, compositor->widget(),
+ &gpu_memory_buffer_manager_, &image_factory_, surface_handle,
"UICompositor");
std::unique_ptr<cc::OutputSurface> display_output_surface;
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/compositor/test/in_process_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698