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 #include "components/bitmap_uploader/bitmap_uploader.h" | 5 #include "components/bitmap_uploader/bitmap_uploader.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "components/mus/public/cpp/gles2_context.h" | 12 #include "components/mus/public/cpp/gles2_context.h" |
13 #include "components/mus/public/cpp/window.h" | 13 #include "components/mus/public/cpp/window.h" |
14 #include "components/mus/public/cpp/window_surface.h" | 14 #include "components/mus/public/cpp/window_surface.h" |
15 #include "mojo/converters/geometry/geometry_type_converters.h" | |
16 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 15 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
17 #include "mojo/converters/surfaces/surfaces_utils.h" | 16 #include "mojo/converters/surfaces/surfaces_utils.h" |
18 #include "services/shell/public/cpp/connector.h" | 17 #include "services/shell/public/cpp/connector.h" |
| 18 #include "ui/gfx/geometry/mojo/geometry_type_converters.h" |
19 | 19 |
20 namespace bitmap_uploader { | 20 namespace bitmap_uploader { |
21 namespace { | 21 namespace { |
22 | 22 |
23 const uint32_t g_transparent_color = 0x00000000; | 23 const uint32_t g_transparent_color = 0x00000000; |
24 | 24 |
25 } // namespace | 25 } // namespace |
26 | 26 |
27 const char kBitmapUploaderForAcceleratedWidget[] = | 27 const char kBitmapUploaderForAcceleratedWidget[] = |
28 "__BITMAP_UPLOADER_ACCELERATED_WIDGET__"; | 28 "__BITMAP_UPLOADER_ACCELERATED_WIDGET__"; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 DCHECK_EQ(1, resource->count); | 227 DCHECK_EQ(1, resource->count); |
228 gl->WaitSyncTokenCHROMIUM(resource->sync_token.GetConstData()); | 228 gl->WaitSyncTokenCHROMIUM(resource->sync_token.GetConstData()); |
229 uint32_t texture_id = resource_to_texture_id_map_[resource->id]; | 229 uint32_t texture_id = resource_to_texture_id_map_[resource->id]; |
230 DCHECK_NE(0u, texture_id); | 230 DCHECK_NE(0u, texture_id); |
231 resource_to_texture_id_map_.erase(resource->id); | 231 resource_to_texture_id_map_.erase(resource->id); |
232 gl->DeleteTextures(1, &texture_id); | 232 gl->DeleteTextures(1, &texture_id); |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 } // namespace bitmap_uploader | 236 } // namespace bitmap_uploader |
OLD | NEW |