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

Side by Side Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 12813004: Chromium style checker cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/image_transport_factory.h" 5 #include "content/browser/renderer_host/image_transport_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 virtual GLHelper* GetGLHelper() OVERRIDE { 85 virtual GLHelper* GetGLHelper() OVERRIDE {
86 return NULL; 86 return NULL;
87 } 87 }
88 88
89 virtual uint32 InsertSyncPoint() OVERRIDE { 89 virtual uint32 InsertSyncPoint() OVERRIDE {
90 return 0; 90 return 0;
91 } 91 }
92 92
93 void WaitSyncPoint(uint32 sync_point) OVERRIDE { 93 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE {
94 } 94 }
95 95
96 // We don't generate lost context events, so we don't need to keep track of 96 // We don't generate lost context events, so we don't need to keep track of
97 // observers 97 // observers
98 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE { 98 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE {
99 } 99 }
100 100
101 virtual void RemoveObserver( 101 virtual void RemoveObserver(
102 ImageTransportFactoryObserver* observer) OVERRIDE { 102 ImageTransportFactoryObserver* observer) OVERRIDE {
103 } 103 }
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 class MainThreadContextProvider : public ContextProviderCommandBuffer { 582 class MainThreadContextProvider : public ContextProviderCommandBuffer {
583 public: 583 public:
584 explicit MainThreadContextProvider(GpuProcessTransportFactory* factory) 584 explicit MainThreadContextProvider(GpuProcessTransportFactory* factory)
585 : factory_(factory) {} 585 : factory_(factory) {}
586 586
587 protected: 587 protected:
588 virtual ~MainThreadContextProvider() {} 588 virtual ~MainThreadContextProvider() {}
589 589
590 virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 590 virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
591 CreateOffscreenContext3d() { 591 CreateOffscreenContext3d() OVERRIDE {
592 return make_scoped_ptr(factory_->CreateOffscreenContext()); 592 return make_scoped_ptr(factory_->CreateOffscreenContext());
593 } 593 }
594 594
595 virtual void OnLostContext() OVERRIDE { 595 virtual void OnLostContext() OVERRIDE {
596 ContextProviderCommandBuffer::OnLostContext(); 596 ContextProviderCommandBuffer::OnLostContext();
597 597
598 MessageLoop::current()->PostTask( 598 MessageLoop::current()->PostTask(
599 FROM_HERE, 599 FROM_HERE,
600 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext, 600 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext,
601 factory_->callback_factory_.GetWeakPtr())); 601 factory_->callback_factory_.GetWeakPtr()));
(...skipping 14 matching lines...) Expand all
616 616
617 class CompositorThreadContextProvider : public ContextProviderCommandBuffer { 617 class CompositorThreadContextProvider : public ContextProviderCommandBuffer {
618 public: 618 public:
619 explicit CompositorThreadContextProvider( 619 explicit CompositorThreadContextProvider(
620 GpuProcessTransportFactory* factory) : factory_(factory) {} 620 GpuProcessTransportFactory* factory) : factory_(factory) {}
621 621
622 protected: 622 protected:
623 virtual ~CompositorThreadContextProvider() {} 623 virtual ~CompositorThreadContextProvider() {}
624 624
625 virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 625 virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
626 CreateOffscreenContext3d() { 626 CreateOffscreenContext3d() OVERRIDE {
627 return make_scoped_ptr(factory_->CreateOffscreenContext()); 627 return make_scoped_ptr(factory_->CreateOffscreenContext());
628 } 628 }
629 629
630 private: 630 private:
631 GpuProcessTransportFactory* factory_; 631 GpuProcessTransportFactory* factory_;
632 }; 632 };
633 633
634 virtual scoped_refptr<cc::ContextProvider> 634 virtual scoped_refptr<cc::ContextProvider>
635 OffscreenContextProviderForCompositorThread() OVERRIDE { 635 OffscreenContextProviderForCompositorThread() OVERRIDE {
636 if (!shared_contexts_compositor_thread_ || 636 if (!shared_contexts_compositor_thread_ ||
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 delete g_factory; 779 delete g_factory;
780 g_factory = NULL; 780 g_factory = NULL;
781 } 781 }
782 782
783 // static 783 // static
784 ImageTransportFactory* ImageTransportFactory::GetInstance() { 784 ImageTransportFactory* ImageTransportFactory::GetInstance() {
785 return g_factory; 785 return g_factory;
786 } 786 }
787 787
788 } // namespace content 788 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698