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

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

Issue 568763004: Support distributing vsync info with surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « cc/surfaces/display_client.h ('k') | content/browser/compositor/onscreen_display_client.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 "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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 scoped_refptr<cc::ContextProvider> offscreen_context_provider; 203 scoped_refptr<cc::ContextProvider> offscreen_context_provider;
204 if (context_provider.get()) { 204 if (context_provider.get()) {
205 offscreen_context_provider = ContextProviderCommandBuffer::Create( 205 offscreen_context_provider = ContextProviderCommandBuffer::Create(
206 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext(), 206 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext(),
207 "Offscreen-Compositor"); 207 "Offscreen-Compositor");
208 } 208 }
209 scoped_ptr<SurfaceDisplayOutputSurface> output_surface( 209 scoped_ptr<SurfaceDisplayOutputSurface> output_surface(
210 new SurfaceDisplayOutputSurface(manager, 210 new SurfaceDisplayOutputSurface(manager,
211 next_surface_id_namespace_++, 211 next_surface_id_namespace_++,
212 offscreen_context_provider)); 212 offscreen_context_provider));
213 display_client->set_surface_output_surface(output_surface.get());
213 output_surface->set_display(display_client->display()); 214 output_surface->set_display(display_client->display());
214 data->display_client = display_client.Pass(); 215 data->display_client = display_client.Pass();
215 return output_surface.PassAs<cc::OutputSurface>(); 216 return output_surface.PassAs<cc::OutputSurface>();
216 } 217 }
217 218
218 if (!context_provider.get()) { 219 if (!context_provider.get()) {
219 if (compositor_thread_.get()) { 220 if (compositor_thread_.get()) {
220 LOG(FATAL) << "Failed to create UI context, but can't use software" 221 LOG(FATAL) << "Failed to create UI context, but can't use software"
221 " compositing with browser threaded compositing. Aborting."; 222 " compositing with browser threaded compositing. Aborting.";
222 } 223 }
(...skipping 249 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
« no previous file with comments | « cc/surfaces/display_client.h ('k') | content/browser/compositor/onscreen_display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698