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

Side by Side Diff: mojo/aura/surface_binding.cc

Issue 808003002: Fix compositor integration in ui/compositor (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | mojo/aura/surface_context_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/aura/surface_binding.h" 5 #include "mojo/aura/surface_binding.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 scoped_ptr<cc::OutputSurface> 176 scoped_ptr<cc::OutputSurface>
177 SurfaceBinding::PerViewManagerState::CreateOutputSurface(View* view) { 177 SurfaceBinding::PerViewManagerState::CreateOutputSurface(View* view) {
178 // TODO(sky): figure out lifetime here. Do I need to worry about the return 178 // TODO(sky): figure out lifetime here. Do I need to worry about the return
179 // value outliving this? 179 // value outliving this?
180 CommandBufferPtr cb; 180 CommandBufferPtr cb;
181 gpu_->CreateOffscreenGLES2Context(GetProxy(&cb)); 181 gpu_->CreateOffscreenGLES2Context(GetProxy(&cb));
182 scoped_refptr<cc::ContextProvider> context_provider( 182 scoped_refptr<cc::ContextProvider> context_provider(
183 new ContextProviderMojo(cb.PassMessagePipe())); 183 new ContextProviderMojo(cb.PassMessagePipe()));
184 return scoped_ptr<cc::OutputSurface>(new OutputSurfaceImpl( 184 return make_scoped_ptr(new OutputSurfaceImpl(
185 view, context_provider, surface_.get(), surface_id_allocator_.get())); 185 view, context_provider, surface_.get(), surface_id_allocator_.get()));
186 } 186 }
187 187
188 SurfaceBinding::PerViewManagerState::PerViewManagerState( 188 SurfaceBinding::PerViewManagerState::PerViewManagerState(
189 Shell* shell, 189 Shell* shell,
190 ViewManager* view_manager) 190 ViewManager* view_manager)
191 : shell_(shell), view_manager_(view_manager) { 191 : shell_(shell), view_manager_(view_manager) {
192 } 192 }
193 193
194 SurfaceBinding::PerViewManagerState::~PerViewManagerState() { 194 SurfaceBinding::PerViewManagerState::~PerViewManagerState() {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 SurfaceBinding::~SurfaceBinding() { 245 SurfaceBinding::~SurfaceBinding() {
246 } 246 }
247 247
248 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { 248 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() {
249 return state_->CreateOutputSurface(view_); 249 return state_->CreateOutputSurface(view_);
250 } 250 }
251 251
252 } // namespace mojo 252 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/aura/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698