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

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

Issue 132473004: aura: Remove sync point methods from ImageTransportFactory api. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/aura/gpu_process_transport_factory.h" 5 #include "content/browser/aura/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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 if (!gl_helper_) { 337 if (!gl_helper_) {
338 scoped_refptr<cc::ContextProvider> provider = 338 scoped_refptr<cc::ContextProvider> provider =
339 SharedMainThreadContextProvider(); 339 SharedMainThreadContextProvider();
340 if (provider.get()) 340 if (provider.get())
341 gl_helper_.reset(new GLHelper(provider->ContextGL(), 341 gl_helper_.reset(new GLHelper(provider->ContextGL(),
342 provider->ContextSupport())); 342 provider->ContextSupport()));
343 } 343 }
344 return gl_helper_.get(); 344 return gl_helper_.get();
345 } 345 }
346 346
347 uint32 GpuProcessTransportFactory::InsertSyncPoint() {
348 scoped_refptr<cc::ContextProvider> provider =
349 SharedMainThreadContextProvider();
350 if (!provider.get())
351 return 0;
352 return provider->ContextGL()->InsertSyncPointCHROMIUM();
353 }
354
355 void GpuProcessTransportFactory::WaitSyncPoint(uint32 sync_point) {
356 scoped_refptr<cc::ContextProvider> provider =
357 SharedMainThreadContextProvider();
358 if (!provider.get())
359 return;
360 provider->ContextGL()->WaitSyncPointCHROMIUM(sync_point);
361 }
362
363 void GpuProcessTransportFactory::AddObserver( 347 void GpuProcessTransportFactory::AddObserver(
364 ImageTransportFactoryObserver* observer) { 348 ImageTransportFactoryObserver* observer) {
365 observer_list_.AddObserver(observer); 349 observer_list_.AddObserver(observer);
366 } 350 }
367 351
368 void GpuProcessTransportFactory::RemoveObserver( 352 void GpuProcessTransportFactory::RemoveObserver(
369 ImageTransportFactoryObserver* observer) { 353 ImageTransportFactoryObserver* observer) {
370 observer_list_.RemoveObserver(observer); 354 observer_list_.RemoveObserver(observer);
371 } 355 }
372 356
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 observer_list_, 481 observer_list_,
498 OnLostResources()); 482 OnLostResources());
499 483
500 // Kill things that use the shared context before killing the shared context. 484 // Kill things that use the shared context before killing the shared context.
501 lost_gl_helper.reset(); 485 lost_gl_helper.reset();
502 lost_offscreen_compositor_contexts = NULL; 486 lost_offscreen_compositor_contexts = NULL;
503 lost_shared_main_thread_contexts = NULL; 487 lost_shared_main_thread_contexts = NULL;
504 } 488 }
505 489
506 } // namespace content 490 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/aura/gpu_process_transport_factory.h ('k') | content/browser/aura/image_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698