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

Issue 1880993003: Use RefPtr for SkBitmap::Allocator in ImageDecoder (Closed)

Created:
4 years, 8 months ago by scroggo_chromium
Modified:
4 years, 3 months ago
Reviewers:
f(malita)
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Justin Novosad, Rik, Stephen Chennney, blink-reviews, f(malita), danakj+watch_chromium.org, kinuko+watch, rwlbuis, reed1
Base URL:
https://chromium.googlesource.com/chromium/src.git@sharedBufferInterface6
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use RefPtr for SkBitmap::Allocator in ImageDecoder ImageFrame: - Store m_allocator in a RefPtr. (This fixes a potential leak, since we previously did not ref/deref it. In practice, we always removed it beforehand anyway.) - Remove accessor for m_allocator, which was only used by operator= (which has access to member variables) ImageDecoder: - Use a PassRefPtr<SkBitmap::Allocator> in setMemoryAllocator, instead of a raw pointer. - Make setMemoryAllocator no longer virtual, since it has no overrides. ImageFrameGenerator: - Use a PassRefPtr for methods taking an SkBitmap::Allocator, and release the ExternalMemoryAllocator to them. No change in behavior, no new tests

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -16 lines) Patch
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp View 1 2 4 chunks +4 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.h View 1 2 3 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp View 1 2 3 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
scroggo_chromium
4 years, 8 months ago (2016-04-14 18:22:31 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1880993003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1880993003/1
4 years, 8 months ago (2016-04-14 19:53:14 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/19306) ios_dbg_simulator_ninja on ...
4 years, 8 months ago (2016-04-14 19:55:44 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1880993003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1880993003/40001
4 years, 8 months ago (2016-04-14 20:34:18 UTC) #9
f(malita)
The change LGTM, but I find the SkBitmap::Allocator semantics and ownership confusing :) While I ...
4 years, 8 months ago (2016-04-14 20:37:06 UTC) #10
scroggo_chromium
On 2016/04/14 20:37:06, f(malita) wrote: > The change LGTM, but I find the SkBitmap::Allocator semantics ...
4 years, 8 months ago (2016-04-14 20:59:32 UTC) #11
commit-bot: I haz the power
4 years, 8 months ago (2016-04-14 23:03:10 UTC) #13
Dry run: This issue passed the CQ dry run.

Powered by Google App Engine
This is Rietveld 408576698