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

Issue 1413583004: refractoring ImageBitmap class (Closed)

Created:
5 years, 1 month ago by xidachen
Modified:
5 years, 1 month ago
Reviewers:
Justin Novosad
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

1. Remove m_imageElement in ImageBitmap. 2. Use SkImage internally, which is thread-safe reference counted, instead of Image 3. Remove class members m_cropRect, m_bitmapRect, and m_bitmapOffset, for simplification purpose, which would result in less bug in the future. Committed: https://crrev.com/0231c3f8988f6c2a9b62c05a4efb1f8705b8553e Cr-Commit-Position: refs/heads/master@{#357872}

Patch Set 1 #

Patch Set 2 : fix unit test #

Total comments: 6

Patch Set 3 : Better method name #

Total comments: 3

Patch Set 4 : remove un-necessary class members #

Patch Set 5 : clean up local vars #

Total comments: 2

Patch Set 6 : fix layout tests errors #

Patch Set 7 : more on fixing errors #

Patch Set 8 : fix test case #

Total comments: 8

Patch Set 9 : fix leaked buffer #

Total comments: 1

Patch Set 10 : clean up code #

Total comments: 1

Patch Set 11 : fix memory leak issue #

Messages

Total messages: 25 (8 generated)
xidachen
Hi Justin, Please review this CL. Thank you.
5 years, 1 month ago (2015-10-30 12:11:19 UTC) #3
Justin Novosad
https://codereview.chromium.org/1413583004/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode163 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:163: void ImageBitmap::notifyImageSourceChanged() I think this method can be removed ...
5 years, 1 month ago (2015-10-30 14:35:19 UTC) #4
xidachen
https://codereview.chromium.org/1413583004/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode163 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:163: void ImageBitmap::notifyImageSourceChanged() This method is an override of ImageLoaderClient::notifyImageSourceChanged(), ...
5 years, 1 month ago (2015-10-30 15:32:35 UTC) #5
Justin Novosad
https://codereview.chromium.org/1413583004/diff/40001/third_party/WebKit/Source/core/frame/ImageBitmap.h File third_party/WebKit/Source/core/frame/ImageBitmap.h (right): https://codereview.chromium.org/1413583004/diff/40001/third_party/WebKit/Source/core/frame/ImageBitmap.h#newcode36 third_party/WebKit/Source/core/frame/ImageBitmap.h:36: PassRefPtr<SkImage> bitmapData() const; Clearer name for this: skImage(). Also, ...
5 years, 1 month ago (2015-10-30 18:57:45 UTC) #6
Justin Novosad
https://codereview.chromium.org/1413583004/diff/80001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/80001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode37 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:37: return adoptRef(image->newSubset(srcRect)); Not so fast! In the case where ...
5 years, 1 month ago (2015-11-02 15:53:19 UTC) #7
xidachen
Hi Justin, Please review this CL. I think there is something wrong with the mac ...
5 years, 1 month ago (2015-11-03 21:58:18 UTC) #9
Justin Novosad
https://codereview.chromium.org/1413583004/diff/140001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/140001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode46 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:46: video->paintCurrentFrame(buffer->canvas(), IntRect(dstPoint, srcRect.size()), nullptr); If the destination rectangle does ...
5 years, 1 month ago (2015-11-03 22:20:00 UTC) #10
xidachen
https://codereview.chromium.org/1413583004/diff/140001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/140001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode46 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:46: video->paintCurrentFrame(buffer->canvas(), IntRect(dstPoint, srcRect.size()), nullptr); Yes indeed. There is a ...
5 years, 1 month ago (2015-11-04 12:59:28 UTC) #11
Justin Novosad
https://codereview.chromium.org/1413583004/diff/140001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/140001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode46 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:46: video->paintCurrentFrame(buffer->canvas(), IntRect(dstPoint, srcRect.size()), nullptr); On 2015/11/04 12:59:27, xidachen wrote: ...
5 years, 1 month ago (2015-11-04 15:12:37 UTC) #12
Justin Novosad
On 2015/11/04 15:12:37, Justin Novosad wrote: > Okay, but you have not re-uploaded the CL. ...
5 years, 1 month ago (2015-11-04 15:13:46 UTC) #13
Justin Novosad
lgtm with nits https://codereview.chromium.org/1413583004/diff/160001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/160001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode141 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:141: SkSurface* surface = SkSurface::NewRaster(info); Nit: you ...
5 years, 1 month ago (2015-11-04 15:20:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413583004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413583004/180001
5 years, 1 month ago (2015-11-04 15:45:48 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/74188)
5 years, 1 month ago (2015-11-04 17:00:35 UTC) #19
Justin Novosad
https://codereview.chromium.org/1413583004/diff/180001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1413583004/diff/180001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode140 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:140: SkSurface* surface = SkSurface::NewRasterN32Premul(cropRect.width(), cropRect.height()); Memory leak: RefPtr<SkSurface> surface ...
5 years, 1 month ago (2015-11-04 17:43:17 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413583004/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413583004/200001
5 years, 1 month ago (2015-11-04 18:39:48 UTC) #23
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 1 month ago (2015-11-04 19:37:23 UTC) #24
commit-bot: I haz the power
5 years, 1 month ago (2015-11-04 19:38:48 UTC) #25
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/0231c3f8988f6c2a9b62c05a4efb1f8705b8553e
Cr-Commit-Position: refs/heads/master@{#357872}

Powered by Google App Engine
This is Rietveld 408576698