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

Side by Side Diff: ui/compositor/compositor.cc

Issue 23072008: aura: Allow in process ContextProvider to hold onscreen contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: inprocesscreatecallback: nit Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 void DefaultContextFactory::RemoveReflector( 131 void DefaultContextFactory::RemoveReflector(
132 scoped_refptr<Reflector> reflector) { 132 scoped_refptr<Reflector> reflector) {
133 } 133 }
134 134
135 scoped_refptr<cc::ContextProvider> 135 scoped_refptr<cc::ContextProvider>
136 DefaultContextFactory::OffscreenContextProviderForMainThread() { 136 DefaultContextFactory::OffscreenContextProviderForMainThread() {
137 if (!offscreen_contexts_main_thread_.get() || 137 if (!offscreen_contexts_main_thread_.get() ||
138 !offscreen_contexts_main_thread_->DestroyedOnMainThread()) { 138 !offscreen_contexts_main_thread_->DestroyedOnMainThread()) {
139 offscreen_contexts_main_thread_ = 139 offscreen_contexts_main_thread_ =
140 webkit::gpu::ContextProviderInProcess::Create(); 140 webkit::gpu::ContextProviderInProcess::CreateOffscreen();
141 if (offscreen_contexts_main_thread_.get() && 141 if (offscreen_contexts_main_thread_.get() &&
142 !offscreen_contexts_main_thread_->BindToCurrentThread()) 142 !offscreen_contexts_main_thread_->BindToCurrentThread())
143 offscreen_contexts_main_thread_ = NULL; 143 offscreen_contexts_main_thread_ = NULL;
144 } 144 }
145 return offscreen_contexts_main_thread_; 145 return offscreen_contexts_main_thread_;
146 } 146 }
147 147
148 scoped_refptr<cc::ContextProvider> 148 scoped_refptr<cc::ContextProvider>
149 DefaultContextFactory::OffscreenContextProviderForCompositorThread() { 149 DefaultContextFactory::OffscreenContextProviderForCompositorThread() {
150 if (!offscreen_contexts_compositor_thread_.get() || 150 if (!offscreen_contexts_compositor_thread_.get() ||
151 !offscreen_contexts_compositor_thread_->DestroyedOnMainThread()) { 151 !offscreen_contexts_compositor_thread_->DestroyedOnMainThread()) {
152 offscreen_contexts_compositor_thread_ = 152 offscreen_contexts_compositor_thread_ =
153 webkit::gpu::ContextProviderInProcess::Create(); 153 webkit::gpu::ContextProviderInProcess::CreateOffscreen();
154 } 154 }
155 return offscreen_contexts_compositor_thread_; 155 return offscreen_contexts_compositor_thread_;
156 } 156 }
157 157
158 void DefaultContextFactory::RemoveCompositor(Compositor* compositor) { 158 void DefaultContextFactory::RemoveCompositor(Compositor* compositor) {
159 } 159 }
160 160
161 bool DefaultContextFactory::DoesCreateTestContexts() { return false; } 161 bool DefaultContextFactory::DoesCreateTestContexts() { return false; }
162 162
163 TestContextFactory::TestContextFactory() {} 163 TestContextFactory::TestContextFactory() {}
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 } 759 }
760 760
761 void Compositor::NotifyEnd() { 761 void Compositor::NotifyEnd() {
762 last_ended_frame_++; 762 last_ended_frame_++;
763 FOR_EACH_OBSERVER(CompositorObserver, 763 FOR_EACH_OBSERVER(CompositorObserver,
764 observer_list_, 764 observer_list_,
765 OnCompositingEnded(this)); 765 OnCompositingEnded(this));
766 } 766 }
767 767
768 } // namespace ui 768 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/android/in_process/synchronous_compositor_impl.cc ('k') | webkit/common/gpu/context_provider_in_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698