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 #ifndef CONTENT_COMMON_GPU_STREAM_TEXTURE_MANAGER_ANDROID_H_ | 5 #ifndef CONTENT_COMMON_GPU_STREAM_TEXTURE_MANAGER_ANDROID_H_ |
6 #define CONTENT_COMMON_GPU_STREAM_TEXTURE_MANAGER_ANDROID_H_ | 6 #define CONTENT_COMMON_GPU_STREAM_TEXTURE_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace content { | 23 namespace content { |
24 class GpuChannel; | 24 class GpuChannel; |
25 | 25 |
26 // Class for managing the stream texture. | 26 // Class for managing the stream texture. |
27 class StreamTextureManagerAndroid : public gpu::StreamTextureManager { | 27 class StreamTextureManagerAndroid : public gpu::StreamTextureManager { |
28 public: | 28 public: |
29 StreamTextureManagerAndroid(GpuChannel* channel); | 29 StreamTextureManagerAndroid(GpuChannel* channel); |
30 virtual ~StreamTextureManagerAndroid(); | 30 virtual ~StreamTextureManagerAndroid(); |
31 | 31 |
32 // implement gpu::StreamTextureManager: | 32 // implement gpu::StreamTextureManager: |
33 virtual GLuint CreateStreamTexture(uint32 service_id, | 33 virtual uint32 CreateStreamTexture(uint32 service_id, |
34 uint32 client_id) OVERRIDE; | 34 uint32 client_id) OVERRIDE; |
35 virtual void DestroyStreamTexture(uint32 service_id) OVERRIDE; | 35 virtual void DestroyStreamTexture(uint32 service_id) OVERRIDE; |
36 virtual gpu::StreamTexture* LookupStreamTexture(uint32 service_id) OVERRIDE; | 36 virtual gpu::StreamTexture* LookupStreamTexture(uint32 service_id) OVERRIDE; |
37 | 37 |
38 // Methods invoked from GpuChannel. | 38 // Methods invoked from GpuChannel. |
39 void RegisterStreamTextureProxy(int32 stream_id, int32 route_id); | 39 void RegisterStreamTextureProxy(int32 stream_id, int32 route_id); |
40 void EstablishStreamTexture( | 40 void EstablishStreamTexture( |
41 int32 stream_id, int32 primary_id, int32 secondary_id); | 41 int32 stream_id, int32 primary_id, int32 secondary_id); |
42 void SetStreamTextureSize(int32 stream_id, const gfx::Size& size); | 42 void SetStreamTextureSize(int32 stream_id, const gfx::Size& size); |
43 | 43 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Map for more convenient lookup. | 103 // Map for more convenient lookup. |
104 typedef IDMap<gpu::StreamTexture, IDMapExternalPointer> TextureServiceIdMap; | 104 typedef IDMap<gpu::StreamTexture, IDMapExternalPointer> TextureServiceIdMap; |
105 TextureServiceIdMap textures_from_service_id_; | 105 TextureServiceIdMap textures_from_service_id_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(StreamTextureManagerAndroid); | 107 DISALLOW_COPY_AND_ASSIGN(StreamTextureManagerAndroid); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace content | 110 } // namespace content |
111 | 111 |
112 #endif // CONTENT_COMMON_GPU_STREAM_TEXTURE_MANAGER_ANDROID_H_ | 112 #endif // CONTENT_COMMON_GPU_STREAM_TEXTURE_MANAGER_ANDROID_H_ |
OLD | NEW |