OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_ | 5 #ifndef COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_ |
6 #define COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_ | 6 #define COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 uint32_t TextureFormat() const { | 64 uint32_t TextureFormat() const { |
65 return format_ == BGRA ? GL_BGRA_EXT : GL_RGBA; | 65 return format_ == BGRA ? GL_BGRA_EXT : GL_RGBA; |
66 } | 66 } |
67 | 67 |
68 void SetIdNamespace(uint32_t id_namespace); | 68 void SetIdNamespace(uint32_t id_namespace); |
69 | 69 |
70 // WindowSurfaceClient implementation. | 70 // WindowSurfaceClient implementation. |
71 void OnResourcesReturned( | 71 void OnResourcesReturned( |
72 mus::WindowSurface* surface, | 72 mus::WindowSurface* surface, |
73 mojo::Array<mus::mojom::ReturnedResourcePtr> resources) override; | 73 mojo::Array<cc::ReturnedResource> resources) override; |
74 | 74 |
75 mus::Window* window_; | 75 mus::Window* window_; |
76 mus::mojom::GpuPtr gpu_service_; | 76 mus::mojom::GpuPtr gpu_service_; |
77 std::unique_ptr<mus::WindowSurface> surface_; | 77 std::unique_ptr<mus::WindowSurface> surface_; |
78 std::unique_ptr<mus::GLES2Context> gles2_context_; | 78 std::unique_ptr<mus::GLES2Context> gles2_context_; |
79 | 79 |
80 uint32_t color_; | 80 uint32_t color_; |
81 int width_; | 81 int width_; |
82 int height_; | 82 int height_; |
83 Format format_; | 83 Format format_; |
84 std::unique_ptr<std::vector<unsigned char>> bitmap_; | 84 std::unique_ptr<std::vector<unsigned char>> bitmap_; |
85 uint32_t next_resource_id_; | 85 uint32_t next_resource_id_; |
86 uint32_t id_namespace_; | 86 uint32_t id_namespace_; |
87 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; | 87 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); | 89 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace bitmap_uploader | 92 } // namespace bitmap_uploader |
93 | 93 |
94 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ | 94 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ |
OLD | NEW |