| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 void SetIdNamespace(uint32_t id_namespace); | 67 void SetIdNamespace(uint32_t id_namespace); |
| 68 | 68 |
| 69 // WindowSurfaceClient implementation. | 69 // WindowSurfaceClient implementation. |
| 70 void OnResourcesReturned( | 70 void OnResourcesReturned( |
| 71 mus::WindowSurface* surface, | 71 mus::WindowSurface* surface, |
| 72 mojo::Array<cc::ReturnedResource> resources) override; | 72 mojo::Array<cc::ReturnedResource> resources) override; |
| 73 | 73 |
| 74 mus::Window* window_; | 74 mus::Window* window_; |
| 75 std::unique_ptr<mus::WindowSurface> surface_; | 75 std::unique_ptr<mus::WindowSurface> surface_; |
| 76 // This may be null if there is an error contacting mus/initializing. We |
| 77 // assume we'll be shutting down soon and do nothing in this case. |
| 76 std::unique_ptr<mus::GLES2Context> gles2_context_; | 78 std::unique_ptr<mus::GLES2Context> gles2_context_; |
| 77 | 79 |
| 78 uint32_t color_; | 80 uint32_t color_; |
| 79 int width_; | 81 int width_; |
| 80 int height_; | 82 int height_; |
| 81 Format format_; | 83 Format format_; |
| 82 std::unique_ptr<std::vector<unsigned char>> bitmap_; | 84 std::unique_ptr<std::vector<unsigned char>> bitmap_; |
| 83 uint32_t next_resource_id_; | 85 uint32_t next_resource_id_; |
| 84 uint32_t id_namespace_; | 86 uint32_t id_namespace_; |
| 85 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_; |
| 86 | 88 |
| 87 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); | 89 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 } // namespace bitmap_uploader | 92 } // namespace bitmap_uploader |
| 91 | 93 |
| 92 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ | 94 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ |
| OLD | NEW |