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

Unified Diff: blimp/client/feature/compositor/blimp_compositor.cc

Issue 2242653002: blimp: Make Blimp client use a Display for compositing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: blimpdisplay: . Created 4 years, 4 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
Index: blimp/client/feature/compositor/blimp_compositor.cc
diff --git a/blimp/client/feature/compositor/blimp_compositor.cc b/blimp/client/feature/compositor/blimp_compositor.cc
index edc742c04ae92b94e213ff05cb0ced659bf1f49e..d1e3688c3e71289726a1b9a95ab33c98c3418a39 100644
--- a/blimp/client/feature/compositor/blimp_compositor.cc
+++ b/blimp/client/feature/compositor/blimp_compositor.cc
@@ -14,6 +14,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "blimp/client/feature/compositor/blimp_context_provider.h"
+#include "blimp/client/feature/compositor/blimp_delegating_output_surface.h"
#include "blimp/client/feature/compositor/blimp_output_surface.h"
#include "cc/animation/animation_host.h"
#include "cc/layers/layer.h"
@@ -255,12 +256,30 @@ void BlimpCompositor::HandlePendingOutputSurfaceRequest() {
if (!host_->visible() || window_ == gfx::kNullAcceleratedWidget)
return;
- scoped_refptr<BlimpContextProvider> context_provider =
+ scoped_refptr<BlimpContextProvider> display_context_provider =
BlimpContextProvider::Create(window_,
client_->GetGpuMemoryBufferManager());
-
- host_->SetOutputSurface(
- base::WrapUnique(new BlimpOutputSurface(context_provider)));
+ scoped_refptr<BlimpContextProvider> compositor_context_provider =
+ BlimpContextProvider::Create(gfx::kNullAcceleratedWidget,
+ client_->GetGpuMemoryBufferManager());
+ scoped_refptr<BlimpContextProvider> worker_context_provider = nullptr;
Wez 2016/08/12 01:56:49 nit: No need for = nullptr here.
+ // TODO(khushalsagar): Make a worker context and bind it to the current
+ // thread:
+ // Worker context is bound to the main thread in RenderThreadImpl. One day
+ // that will change and then this will have to be removed.
+ // worker_context_provider->BindToCurrentThread();
Wez 2016/08/12 01:56:49 This is commented out; what is it that will one da
danakj 2016/08/12 18:16:53 When the context isn't null, this will have to be
+
+ auto display_output_surface =
+ base::MakeUnique<BlimpOutputSurface>(std::move(display_context_provider));
+ auto delegating_output_surface =
+ base::MakeUnique<BlimpDelegatingOutputSurface>(
+ std::move(compositor_context_provider),
+ std::move(worker_context_provider), std::move(display_output_surface),
+ client_->GetGpuMemoryBufferManager(),
+ host_->settings().renderer_settings,
+ client_->GetCompositorTaskRunner().get());
+
+ host_->SetOutputSurface(std::move(delegating_output_surface));
output_surface_request_pending_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698