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

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

Issue 251343002: Remove offscreen compositor contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-offscreencontext: include Created 6 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
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | no next file » | 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 e49ea5162033aa4a498b5c5514c86386106d9821..959d984e3deb7f74e952ced398dcd9a6195e1ec1 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -54,33 +54,15 @@ void InProcessContextFactory::RemoveReflector(
scoped_refptr<Reflector> reflector) {}
scoped_refptr<cc::ContextProvider>
-InProcessContextFactory::OffscreenCompositorContextProvider() {
- if (!offscreen_compositor_contexts_.get() ||
- !offscreen_compositor_contexts_->DestroyedOnMainThread()) {
- bool lose_context_when_out_of_memory = true;
- offscreen_compositor_contexts_ =
- webkit::gpu::ContextProviderInProcess::CreateOffscreen(
- lose_context_when_out_of_memory);
- }
- return offscreen_compositor_contexts_;
-}
-
-scoped_refptr<cc::ContextProvider>
InProcessContextFactory::SharedMainThreadContextProvider() {
if (shared_main_thread_contexts_ &&
!shared_main_thread_contexts_->DestroyedOnMainThread())
return shared_main_thread_contexts_;
- if (ui::Compositor::WasInitializedWithThread()) {
- bool lose_context_when_out_of_memory = false;
- shared_main_thread_contexts_ =
- webkit::gpu::ContextProviderInProcess::CreateOffscreen(
- lose_context_when_out_of_memory);
- } else {
- shared_main_thread_contexts_ =
- static_cast<webkit::gpu::ContextProviderInProcess*>(
- OffscreenCompositorContextProvider().get());
- }
+ bool lose_context_when_out_of_memory = false;
+ shared_main_thread_contexts_ =
+ webkit::gpu::ContextProviderInProcess::CreateOffscreen(
+ lose_context_when_out_of_memory);
if (shared_main_thread_contexts_ &&
!shared_main_thread_contexts_->BindToCurrentThread())
shared_main_thread_contexts_ = NULL;
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698