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

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

Issue 1189943002: content: Fix lost context handling when using native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: retry logic and remove singleton Created 5 years, 6 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 DCHECK(!gl_helper_) << "Destroying the GLHelper should not cause a new " 404 DCHECK(!gl_helper_) << "Destroying the GLHelper should not cause a new "
405 "GLHelper to be created."; 405 "GLHelper to be created.";
406 } 406 }
407 } 407 }
408 408
409 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } 409 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; }
410 410
411 uint32 GpuProcessTransportFactory::GetImageTextureTarget( 411 uint32 GpuProcessTransportFactory::GetImageTextureTarget(
412 gfx::GpuMemoryBuffer::Format format, 412 gfx::GpuMemoryBuffer::Format format,
413 gfx::GpuMemoryBuffer::Usage usage) { 413 gfx::GpuMemoryBuffer::Usage usage) {
414 return BrowserGpuChannelHostFactory::GetImageTextureTarget(format, usage); 414 return BrowserGpuMemoryBufferManager::GetImageTextureTarget(format, usage);
415 } 415 }
416 416
417 cc::SharedBitmapManager* GpuProcessTransportFactory::GetSharedBitmapManager() { 417 cc::SharedBitmapManager* GpuProcessTransportFactory::GetSharedBitmapManager() {
418 return HostSharedBitmapManager::current(); 418 return HostSharedBitmapManager::current();
419 } 419 }
420 420
421 gpu::GpuMemoryBufferManager* 421 gpu::GpuMemoryBufferManager*
422 GpuProcessTransportFactory::GetGpuMemoryBufferManager() { 422 GpuProcessTransportFactory::GetGpuMemoryBufferManager() {
423 return BrowserGpuMemoryBufferManager::current(); 423 return BrowserGpuMemoryBufferManager::current();
424 } 424 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 615 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
616 observer_list_, 616 observer_list_,
617 OnLostResources()); 617 OnLostResources());
618 618
619 // Kill things that use the shared context before killing the shared context. 619 // Kill things that use the shared context before killing the shared context.
620 lost_gl_helper.reset(); 620 lost_gl_helper.reset();
621 lost_shared_main_thread_contexts = NULL; 621 lost_shared_main_thread_contexts = NULL;
622 } 622 }
623 623
624 } // namespace content 624 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/buffer_queue_unittest.cc ('k') | content/browser/gpu/browser_gpu_channel_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698