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

Unified Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp

Issue 2455983005: Refactor AcceleratedStaticBitmapImage (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
index 948b02956d439adbfc501e2932c0246d4d1f8337..64b5ed8a6faf81844befa95054f6f8b1ef1afaaf 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
@@ -321,6 +321,9 @@ void OffscreenCanvasFrameDispatcherImpl::DidReceiveCompositorFrameAck() {
void OffscreenCanvasFrameDispatcherImpl::ReclaimResources(
const cc::ReturnedResourceArray& resources) {
for (const auto& resource : resources) {
+ RefPtr<StaticBitmapImage> image = m_cachedImages.get(resource.id);
+ if (image)
+ image->deleteTexture(resource.sync_token.GetConstData());
xidachen 2016/10/27 20:20:45 junov@: With this change, the commit() will crash
Justin Novosad 2016/10/28 18:08:00 We should not be deleting any textures here. We sh
xidachen 2016/10/28 21:14:15 In the new PS, I move the DeleteTexture to the des
m_cachedImages.remove(resource.id);
m_sharedBitmaps.remove(resource.id);
m_cachedTextureIds.remove(resource.id);

Powered by Google App Engine
This is Rietveld 408576698