Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: content/renderer/compositor_bindings/web_external_texture_layer_impl.cc

Issue 369823002: Forward the boolean flag indicating if the resource is lost to canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/renderer/compositor_bindings/web_external_texture_layer_impl.h " 5 #include "content/renderer/compositor_bindings/web_external_texture_layer_impl.h "
6 6
7 #include "cc/layers/texture_layer.h" 7 #include "cc/layers/texture_layer.h"
8 #include "cc/resources/resource_update_queue.h" 8 #include "cc/resources/resource_update_queue.h"
9 #include "cc/resources/single_release_callback.h" 9 #include "cc/resources/single_release_callback.h"
10 #include "cc/resources/texture_mailbox.h" 10 #include "cc/resources/texture_mailbox.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return new WebExternalBitmapImpl; 106 return new WebExternalBitmapImpl;
107 } 107 }
108 108
109 // static 109 // static
110 void WebExternalTextureLayerImpl::DidReleaseMailbox( 110 void WebExternalTextureLayerImpl::DidReleaseMailbox(
111 base::WeakPtr<WebExternalTextureLayerImpl> layer, 111 base::WeakPtr<WebExternalTextureLayerImpl> layer,
112 const blink::WebExternalTextureMailbox& mailbox, 112 const blink::WebExternalTextureMailbox& mailbox,
113 WebExternalBitmapImpl* bitmap, 113 WebExternalBitmapImpl* bitmap,
114 unsigned sync_point, 114 unsigned sync_point,
115 bool lost_resource) { 115 bool lost_resource) {
116 if (lost_resource || !layer) { 116 if (!layer) {
117 delete bitmap; 117 delete bitmap;
118 return; 118 return;
119 } 119 }
120 120
121 blink::WebExternalTextureMailbox available_mailbox; 121 blink::WebExternalTextureMailbox available_mailbox;
122 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); 122 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name));
123 available_mailbox.syncPoint = sync_point; 123 available_mailbox.syncPoint = sync_point;
124 if (bitmap) 124 if (bitmap)
125 layer->free_bitmaps_.push_back(bitmap); 125 layer->free_bitmaps_.push_back(bitmap);
126 layer->client_->mailboxReleased(available_mailbox); 126 layer->client_->mailboxReleased(available_mailbox, lost_resource);
127 } 127 }
128 128
129 } // namespace content 129 } // namespace content
130 130
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698