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

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

Issue 1356463002: Revert of cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« 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 1d96e0188b1639283e6b47312d1a111ba0002c1d..942947d5b1b020f3ebfcfe21cc7cf2097d2067cb 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -112,37 +112,19 @@
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_) {
- // Note: If context is lost, delete reference after releasing the lock.
- base::AutoLock lock(*shared_worker_context_provider_->GetLock());
- if (shared_worker_context_provider_->ContextGL()
- ->GetGraphicsResetStatusKHR() != GL_NO_ERROR) {
- shared_worker_context_provider_lost = true;
- }
- }
- if (!shared_worker_context_provider_ || shared_worker_context_provider_lost) {
- shared_worker_context_provider_ = InProcessContextProvider::CreateOffscreen(
- &gpu_memory_buffer_manager_, &image_factory_);
- if (shared_worker_context_provider_ &&
- !shared_worker_context_provider_->BindToCurrentThread())
- shared_worker_context_provider_ = nullptr;
- if (shared_worker_context_provider_)
- shared_worker_context_provider_->SetupLock();
- }
+ scoped_refptr<InProcessContextProvider> worker_context_provider =
+ InProcessContextProvider::CreateOffscreen(&gpu_memory_buffer_manager_,
+ &image_factory_);
scoped_ptr<cc::OutputSurface> real_output_surface;
if (use_test_surface_) {
bool flipped_output_surface = false;
real_output_surface = make_scoped_ptr(new cc::PixelTestOutputSurface(
- context_provider, shared_worker_context_provider_,
- flipped_output_surface));
+ context_provider, worker_context_provider, flipped_output_surface));
} else {
- real_output_surface = make_scoped_ptr(new DirectOutputSurface(
- context_provider, shared_worker_context_provider_));
+ real_output_surface = make_scoped_ptr(
+ new DirectOutputSurface(context_provider, worker_context_provider));
}
if (surface_manager_) {
@@ -154,7 +136,7 @@
scoped_ptr<cc::SurfaceDisplayOutputSurface> surface_output_surface(
new cc::SurfaceDisplayOutputSurface(
surface_manager_, compositor->surface_id_allocator(),
- context_provider, shared_worker_context_provider_));
+ context_provider, worker_context_provider));
display_client->set_surface_output_surface(surface_output_surface.get());
surface_output_surface->set_display_client(display_client.get());
« 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