OLD | NEW |
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 public: | 115 public: |
116 explicit ImageTransportClientTexture(const gfx::Size& size) | 116 explicit ImageTransportClientTexture(const gfx::Size& size) |
117 : ImageTransportClient(true, size) { | 117 : ImageTransportClient(true, size) { |
118 } | 118 } |
119 | 119 |
120 virtual bool Initialize(uint64* surface_id) OVERRIDE { | 120 virtual bool Initialize(uint64* surface_id) OVERRIDE { |
121 set_texture_id(*surface_id); | 121 set_texture_id(*surface_id); |
122 return true; | 122 return true; |
123 } | 123 } |
124 | 124 |
125 virtual ~ImageTransportClientTexture() {} | |
126 virtual void Update() OVERRIDE {} | 125 virtual void Update() OVERRIDE {} |
127 virtual TransportDIB::Handle Handle() const OVERRIDE { | 126 virtual TransportDIB::Handle Handle() const OVERRIDE { |
128 return TransportDIB::DefaultHandleValue(); | 127 return TransportDIB::DefaultHandleValue(); |
129 } | 128 } |
130 | 129 |
| 130 protected: |
| 131 virtual ~ImageTransportClientTexture() {} |
| 132 |
131 private: | 133 private: |
132 DISALLOW_COPY_AND_ASSIGN(ImageTransportClientTexture); | 134 DISALLOW_COPY_AND_ASSIGN(ImageTransportClientTexture); |
133 }; | 135 }; |
134 | 136 |
135 class GpuProcessTransportFactory; | 137 class GpuProcessTransportFactory; |
136 | 138 |
137 class CompositorSwapClient | 139 class CompositorSwapClient |
138 : public base::SupportsWeakPtr<CompositorSwapClient>, | 140 : public base::SupportsWeakPtr<CompositorSwapClient>, |
139 public WebGraphicsContext3DSwapBuffersClient { | 141 public WebGraphicsContext3DSwapBuffersClient { |
140 public: | 142 public: |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 void ImageTransportFactory::Terminate() { | 414 void ImageTransportFactory::Terminate() { |
413 ui::ContextFactory::SetInstance(NULL); | 415 ui::ContextFactory::SetInstance(NULL); |
414 delete g_factory; | 416 delete g_factory; |
415 g_factory = NULL; | 417 g_factory = NULL; |
416 } | 418 } |
417 | 419 |
418 // static | 420 // static |
419 ImageTransportFactory* ImageTransportFactory::GetInstance() { | 421 ImageTransportFactory* ImageTransportFactory::GetInstance() { |
420 return g_factory; | 422 return g_factory; |
421 } | 423 } |
OLD | NEW |