| 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/window.h" | 12 #include "components/mus/public/cpp/window.h" |
| 13 #include "components/mus/public/cpp/window_surface.h" | 13 #include "components/mus/public/cpp/window_surface.h" |
| 14 #include "mojo/application/public/cpp/application_impl.h" | |
| 15 #include "mojo/application/public/cpp/connect.h" | |
| 16 #include "mojo/application/public/interfaces/shell.mojom.h" | |
| 17 #include "mojo/converters/geometry/geometry_type_converters.h" | 14 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 18 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 15 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
| 19 #include "mojo/converters/surfaces/surfaces_utils.h" | 16 #include "mojo/converters/surfaces/surfaces_utils.h" |
| 20 #include "mojo/public/c/gles2/gles2.h" | 17 #include "mojo/public/c/gles2/gles2.h" |
| 21 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 18 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
| 19 #include "mojo/shell/public/cpp/application_impl.h" |
| 20 #include "mojo/shell/public/cpp/connect.h" |
| 21 #include "mojo/shell/public/interfaces/shell.mojom.h" |
| 22 | 22 |
| 23 namespace bitmap_uploader { | 23 namespace bitmap_uploader { |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 const uint32_t g_transparent_color = 0x00000000; | 26 const uint32_t g_transparent_color = 0x00000000; |
| 27 | 27 |
| 28 void LostContext(void*) { | 28 void LostContext(void*) { |
| 29 // TODO(fsamuel): Figure out if there's something useful to do here. | 29 // TODO(fsamuel): Figure out if there's something useful to do here. |
| 30 } | 30 } |
| 31 | 31 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 glWaitSyncTokenCHROMIUM( | 257 glWaitSyncTokenCHROMIUM( |
| 258 resource->sync_token.To<gpu::SyncToken>().GetConstData()); | 258 resource->sync_token.To<gpu::SyncToken>().GetConstData()); |
| 259 uint32_t texture_id = resource_to_texture_id_map_[resource->id]; | 259 uint32_t texture_id = resource_to_texture_id_map_[resource->id]; |
| 260 DCHECK_NE(0u, texture_id); | 260 DCHECK_NE(0u, texture_id); |
| 261 resource_to_texture_id_map_.erase(resource->id); | 261 resource_to_texture_id_map_.erase(resource->id); |
| 262 glDeleteTextures(1, &texture_id); | 262 glDeleteTextures(1, &texture_id); |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace bitmap_uploader | 266 } // namespace bitmap_uploader |
| OLD | NEW |