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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "components/mus/public/cpp/window.h" | 9 #include "components/mus/public/cpp/window.h" |
10 #include "components/mus/public/cpp/window_surface.h" | 10 #include "components/mus/public/cpp/window_surface.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 const uint32_t g_transparent_color = 0x00000000; | 22 const uint32_t g_transparent_color = 0x00000000; |
23 | 23 |
24 void LostContext(void*) { | 24 void LostContext(void*) { |
25 DCHECK(false); | 25 DCHECK(false); |
26 } | 26 } |
27 | 27 |
28 void OnGotContentHandlerID(uint32_t content_handler_id) {} | 28 void OnGotContentHandlerID(uint32_t content_handler_id) {} |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
| 32 const char kBitmapUploaderForAcceleratedWidget[] = |
| 33 "__BITMAP_UPLOADER_ACCELERATED_WIDGET__"; |
| 34 |
32 BitmapUploader::BitmapUploader(mus::Window* window) | 35 BitmapUploader::BitmapUploader(mus::Window* window) |
33 : window_(window), | 36 : window_(window), |
34 color_(g_transparent_color), | 37 color_(g_transparent_color), |
35 width_(0), | 38 width_(0), |
36 height_(0), | 39 height_(0), |
37 format_(BGRA), | 40 format_(BGRA), |
38 next_resource_id_(1u), | 41 next_resource_id_(1u), |
39 id_namespace_(0u), | 42 id_namespace_(0u), |
40 local_id_(0u), | 43 local_id_(0u), |
41 surface_client_binding_(this) {} | 44 surface_client_binding_(this) {} |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 glWaitSyncTokenCHROMIUM( | 251 glWaitSyncTokenCHROMIUM( |
249 resource->sync_token.To<gpu::SyncToken>().GetConstData()); | 252 resource->sync_token.To<gpu::SyncToken>().GetConstData()); |
250 uint32_t texture_id = resource_to_texture_id_map_[resource->id]; | 253 uint32_t texture_id = resource_to_texture_id_map_[resource->id]; |
251 DCHECK_NE(0u, texture_id); | 254 DCHECK_NE(0u, texture_id); |
252 resource_to_texture_id_map_.erase(resource->id); | 255 resource_to_texture_id_map_.erase(resource->id); |
253 glDeleteTextures(1, &texture_id); | 256 glDeleteTextures(1, &texture_id); |
254 } | 257 } |
255 } | 258 } |
256 | 259 |
257 } // namespace bitmap_uploader | 260 } // namespace bitmap_uploader |
OLD | NEW |