| 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 |
| 23 // BitmapUploader is useful if you want to draw a bitmap or color in a | 25 // BitmapUploader is useful if you want to draw a bitmap or color in a |
| 24 // mus::Window. | 26 // mus::Window. |
| 25 class BitmapUploader : public mus::mojom::SurfaceClient { | 27 class BitmapUploader : public mus::mojom::SurfaceClient { |
| 26 public: | 28 public: |
| 27 explicit BitmapUploader(mus::Window* window); | 29 explicit BitmapUploader(mus::Window* window); |
| 28 ~BitmapUploader() override; | 30 ~BitmapUploader() override; |
| 29 | 31 |
| 30 void Init(mojo::Shell* shell); | 32 void Init(mojo::Shell* shell); |
| 31 | 33 |
| 32 // Sets the color which is RGBA. | 34 // Sets the color which is RGBA. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 uint32_t local_id_; | 76 uint32_t local_id_; |
| 75 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; | 77 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; |
| 76 mojo::Binding<mus::mojom::SurfaceClient> surface_client_binding_; | 78 mojo::Binding<mus::mojom::SurfaceClient> surface_client_binding_; |
| 77 | 79 |
| 78 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); | 80 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 } // namespace bitmap_uploader | 83 } // namespace bitmap_uploader |
| 82 | 84 |
| 83 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ | 85 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ |
| OLD | NEW |