OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/blink/web_external_texture_layer_impl.h" | 5 #include "cc/blink/web_external_texture_layer_impl.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "cc/blink/web_external_bitmap_impl.h" | 8 #include "cc/blink/web_external_bitmap_impl.h" |
9 #include "cc/blink/web_layer_impl.h" | 9 #include "cc/blink/web_layer_impl.h" |
10 #include "cc/layers/texture_layer.h" | 10 #include "cc/layers/texture_layer.h" |
11 #include "cc/resources/single_release_callback.h" | 11 #include "cc/resources/single_release_callback.h" |
12 #include "cc/resources/texture_mailbox.h" | 12 #include "cc/resources/texture_mailbox.h" |
13 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" | 13 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" |
14 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" | 14 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" |
15 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 15 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
16 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | |
17 #include "third_party/WebKit/public/platform/WebSize.h" | 16 #include "third_party/WebKit/public/platform/WebSize.h" |
18 #include "third_party/khronos/GLES2/gl2.h" | 17 #include "third_party/khronos/GLES2/gl2.h" |
19 | 18 |
20 using cc::TextureLayer; | 19 using cc::TextureLayer; |
21 | 20 |
22 namespace cc_blink { | 21 namespace cc_blink { |
23 | 22 |
24 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl( | 23 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl( |
25 blink::WebExternalTextureLayerClient* client) | 24 blink::WebExternalTextureLayerClient* client) |
26 : client_(client) { | 25 : client_(client) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); | 132 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); |
134 memcpy(available_mailbox.syncToken, sync_token.GetConstData(), | 133 memcpy(available_mailbox.syncToken, sync_token.GetConstData(), |
135 sizeof(sync_token)); | 134 sizeof(sync_token)); |
136 available_mailbox.validSyncToken = sync_token.HasData(); | 135 available_mailbox.validSyncToken = sync_token.HasData(); |
137 if (bitmap) | 136 if (bitmap) |
138 layer->free_bitmaps_.push_back(base::WrapUnique(bitmap)); | 137 layer->free_bitmaps_.push_back(base::WrapUnique(bitmap)); |
139 layer->client_->mailboxReleased(available_mailbox, lost_resource); | 138 layer->client_->mailboxReleased(available_mailbox, lost_resource); |
140 } | 139 } |
141 | 140 |
142 } // namespace cc_blink | 141 } // namespace cc_blink |
OLD | NEW |