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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 571623003: Partial swap implementation for surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
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 "content/browser/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 scoped_ptr<BrowserCompositorOutputSurface> surface; 234 scoped_ptr<BrowserCompositorOutputSurface> surface;
235 #if defined(USE_OZONE) 235 #if defined(USE_OZONE)
236 if (ui::SurfaceFactoryOzone::GetInstance()->CanShowPrimaryPlaneAsOverlay()) { 236 if (ui::SurfaceFactoryOzone::GetInstance()->CanShowPrimaryPlaneAsOverlay()) {
237 surface.reset(new GpuSurfacelessBrowserCompositorOutputSurface( 237 surface.reset(new GpuSurfacelessBrowserCompositorOutputSurface(
238 context_provider, 238 context_provider,
239 per_compositor_data_[compositor]->surface_id, 239 per_compositor_data_[compositor]->surface_id,
240 &output_surface_map_, 240 &output_surface_map_,
241 compositor->vsync_manager(), 241 compositor->vsync_manager(),
242 CreateOverlayCandidateValidator(compositor->widget()), 242 CreateOverlayCandidateValidator(compositor->widget()),
243 GetGLHelper(),
alexst (slow to review) 2014/09/17 20:34:06 I don't think this is safe to do. If a context is
achaulk 2014/09/17 20:41:57 Done.
243 GL_RGB8_OES)); 244 GL_RGB8_OES));
244 } 245 }
245 #endif 246 #endif
246 if (!surface) 247 if (!surface)
247 surface.reset(new GpuBrowserCompositorOutputSurface( 248 surface.reset(new GpuBrowserCompositorOutputSurface(
248 context_provider, 249 context_provider,
249 per_compositor_data_[compositor]->surface_id, 250 per_compositor_data_[compositor]->surface_id,
250 &output_surface_map_, 251 &output_surface_map_,
251 compositor->vsync_manager(), 252 compositor->vsync_manager(),
252 CreateOverlayCandidateValidator(compositor->widget()))); 253 CreateOverlayCandidateValidator(compositor->widget())));
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 473 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
473 observer_list_, 474 observer_list_,
474 OnLostResources()); 475 OnLostResources());
475 476
476 // Kill things that use the shared context before killing the shared context. 477 // Kill things that use the shared context before killing the shared context.
477 lost_gl_helper.reset(); 478 lost_gl_helper.reset();
478 lost_shared_main_thread_contexts = NULL; 479 lost_shared_main_thread_contexts = NULL;
479 } 480 }
480 481
481 } // namespace content 482 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698