| 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 "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/mus/public/cpp/window_surface.h" | 10 #include "components/mus/public/cpp/window_surface.h" |
| 11 #include "components/mus/public/interfaces/compositor_frame.mojom.h" | 11 #include "components/mus/public/interfaces/compositor_frame.mojom.h" |
| 12 #include "components/mus/public/interfaces/gpu.mojom.h" | 12 #include "components/mus/public/interfaces/gpu.mojom.h" |
| 13 #include "gpu/GLES2/gl2chromium.h" | 13 #include "gpu/GLES2/gl2chromium.h" |
| 14 #include "gpu/GLES2/gl2extchromium.h" | 14 #include "gpu/GLES2/gl2extchromium.h" |
| 15 #include "mojo/public/c/gles2/gles2.h" | 15 #include "mojo/public/c/gles2/gles2.h" |
| 16 | 16 |
| 17 namespace mojo { | 17 namespace mojo { |
| 18 class Shell; | 18 class Shell; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace bitmap_uploader { | 21 namespace bitmap_uploader { |
| 22 | 22 |
| 23 extern const char kBitmapUploaderForAcceleratedWidget[]; | |
| 24 | |
| 25 // BitmapUploader is useful if you want to draw a bitmap or color in a | 23 // BitmapUploader is useful if you want to draw a bitmap or color in a |
| 26 // mus::Window. | 24 // mus::Window. |
| 27 class BitmapUploader : public mus::mojom::SurfaceClient { | 25 class BitmapUploader : public mus::mojom::SurfaceClient { |
| 28 public: | 26 public: |
| 29 explicit BitmapUploader(mus::Window* window); | 27 explicit BitmapUploader(mus::Window* window); |
| 30 ~BitmapUploader() override; | 28 ~BitmapUploader() override; |
| 31 | 29 |
| 32 void Init(mojo::Shell* shell); | 30 void Init(mojo::Shell* shell); |
| 33 | 31 |
| 34 // Sets the color which is RGBA. | 32 // Sets the color which is RGBA. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 uint32_t local_id_; | 74 uint32_t local_id_; |
| 77 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; | 75 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; |
| 78 mojo::Binding<mus::mojom::SurfaceClient> surface_client_binding_; | 76 mojo::Binding<mus::mojom::SurfaceClient> surface_client_binding_; |
| 79 | 77 |
| 80 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); | 78 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); |
| 81 }; | 79 }; |
| 82 | 80 |
| 83 } // namespace bitmap_uploader | 81 } // namespace bitmap_uploader |
| 84 | 82 |
| 85 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ | 83 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ |
| OLD | NEW |