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

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

Issue 1864373002: Remove unused features for in-process GL contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inproclost: allthethings Created 4 years, 8 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: 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 6d842554ae4d179ad5d8567fb45c6981ffe4f1ec..af58ac5201665503954b86a9e4d362a8b1c503be 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -102,23 +102,6 @@ InProcessContextFactory::~InProcessContextFactory() {
void InProcessContextFactory::CreateOutputSurface(
base::WeakPtr<Compositor> compositor) {
- gpu::gles2::ContextCreationAttribHelper attribs;
- attribs.alpha_size = 8;
- attribs.blue_size = 8;
- attribs.green_size = 8;
- attribs.red_size = 8;
- attribs.depth_size = 0;
- attribs.stencil_size = 0;
- attribs.samples = 0;
- attribs.sample_buffers = 0;
- attribs.fail_if_major_perf_caveat = false;
- attribs.bind_generates_resource = false;
-
- scoped_refptr<InProcessContextProvider> context_provider =
- InProcessContextProvider::Create(attribs, &gpu_memory_buffer_manager_,
- &image_factory_,
- compositor->widget(), "UICompositor");
-
// Try to reuse existing shared worker context provider.
bool shared_worker_context_provider_lost = false;
if (shared_worker_context_provider_) {
@@ -131,7 +114,7 @@ void InProcessContextFactory::CreateOutputSurface(
}
if (!shared_worker_context_provider_ || shared_worker_context_provider_lost) {
shared_worker_context_provider_ = InProcessContextProvider::CreateOffscreen(
- &gpu_memory_buffer_manager_, &image_factory_);
+ &gpu_memory_buffer_manager_, &image_factory_, nullptr);
if (shared_worker_context_provider_ &&
!shared_worker_context_provider_->BindToCurrentThread())
shared_worker_context_provider_ = nullptr;
@@ -139,6 +122,23 @@ void InProcessContextFactory::CreateOutputSurface(
shared_worker_context_provider_->SetupLock();
}
+ gpu::gles2::ContextCreationAttribHelper attribs;
+ attribs.alpha_size = 8;
+ attribs.blue_size = 8;
+ attribs.green_size = 8;
+ attribs.red_size = 8;
+ attribs.depth_size = 0;
+ attribs.stencil_size = 0;
+ attribs.samples = 0;
+ attribs.sample_buffers = 0;
+ attribs.fail_if_major_perf_caveat = false;
+ attribs.bind_generates_resource = false;
+ scoped_refptr<InProcessContextProvider> context_provider =
+ InProcessContextProvider::Create(
+ attribs, shared_worker_context_provider_.get(),
+ &gpu_memory_buffer_manager_, &image_factory_, compositor->widget(),
+ "UICompositor");
+
scoped_ptr<cc::OutputSurface> real_output_surface;
if (use_test_surface_) {
@@ -190,7 +190,7 @@ InProcessContextFactory::SharedMainThreadContextProvider() {
return shared_main_thread_contexts_;
shared_main_thread_contexts_ = InProcessContextProvider::CreateOffscreen(
- &gpu_memory_buffer_manager_, &image_factory_);
+ &gpu_memory_buffer_manager_, &image_factory_, nullptr);
if (shared_main_thread_contexts_.get() &&
!shared_main_thread_contexts_->BindToCurrentThread())
shared_main_thread_contexts_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698