|
|
Created:
3 years, 8 months ago by danakj Modified:
3 years, 8 months ago CC:
chromium-reviews, krit, dshwang, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, pdr+graphicswatchlist_chromium.org, Justin Novosad, haraken, dglazkov+blink, Rik, fmalita+watch_chromium.org, blink-reviews, kinuko+watch, ajuma+watch_chromium.org, Stephen Chennney, rwlbuis, enne (OOO) Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionRemove unneeded abstractions and simplify RecordingImageBufferSurface
This is a set of misc cleanups I found while rearranging code around
RecordingImageBufferSurface in order to remove
PaintCanvas::writePixels.
- Replaces WrapUnique with MakeUnique.
- Removes the unneeded factory abstraction, since all instances of it
make an UnacceleratedImageBufferSurface.
- Removes unneeded friend relationship from RecordingImageBufferSurface
to its unit tests.
- Change tests to check IsRecording() instead of peeking internals or
checking if the factory was used. IsRecording() is true if we did not
fall back to UnacceleratedImageBufferSurface and false otherwise,
which is what the tests want to know.
- Use IntRect::Contains instead of writing that with comparisons.
- Remove "ForTesting" from a class name defined in tests, its also
redundant with the Fake prefix that is already present.
- Some capitalization/punctuation for comments.
R=pdr@chromium.org, xlai@chromium.org
BUG=671433
Review-Url: https://codereview.chromium.org/2833593002
Cr-Commit-Position: refs/heads/master@{#466397}
Committed: https://chromium.googlesource.com/chromium/src/+/a07bd8034e0ebf854efb8cd80eb7d543d7b8b228
Patch Set 1 #Patch Set 2 : imagebuffersurface-cleanups: . #
Total comments: 2
Patch Set 3 : imagebuffersurface-cleanups: fixbracket #Patch Set 4 : imagebuffersurface-cleanups: rebase #Patch Set 5 : imagebuffersurface-cleanups: fix-compile #Patch Set 6 : imagebuffersurface-cleanups: morefixcompile #
Messages
Total messages: 42 (25 generated)
Description was changed from ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique in the related unit tests. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. R=pdr@chromium.org, xlai@chromium.org BUG=671433 ========== to ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique in the related unit tests. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. - Use IntRect::Contains instead of writing that with comparisons. R=pdr@chromium.org, xlai@chromium.org BUG=671433 ==========
Description was changed from ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique in the related unit tests. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. - Use IntRect::Contains instead of writing that with comparisons. R=pdr@chromium.org, xlai@chromium.org BUG=671433 ========== to ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. - Use IntRect::Contains instead of writing that with comparisons. - Remove "ForTesting" from a class name defined in tests, its also redundant with the Fake prefix that is already present. R=pdr@chromium.org, xlai@chromium.org BUG=671433 ==========
The CQ bit was checked by danakj@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. - Use IntRect::Contains instead of writing that with comparisons. - Remove "ForTesting" from a class name defined in tests, its also redundant with the Fake prefix that is already present. R=pdr@chromium.org, xlai@chromium.org BUG=671433 ========== to ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. - Use IntRect::Contains instead of writing that with comparisons. - Remove "ForTesting" from a class name defined in tests, its also redundant with the Fake prefix that is already present. - Some capitalization/punctuation for comments. R=pdr@chromium.org, xlai@chromium.org BUG=671433 ==========
xlai: please review pdr: owners stamps https://codereview.chromium.org/2833593002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp (left): https://codereview.chromium.org/2833593002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp:94: new RecordingImageBufferSurface(size, nullptr /* fallbackFactory */, This nullptr would have triggered a DCHECK and crash if fallback happened, and would prevent fallback due to kExpensiveRecordingStackDepth. Is this needed, cuz I could pass a bool here to do what the nullptr used to if you think it is? https://codereview.chromium.org/2833593002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp (left): https://codereview.chromium.org/2833593002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp:63: test_surface_->InitializeCurrentFrame(); This is already done in the RecordingImageBufferSurface constructor.
danakj@chromium.org changed reviewers: + ikilpatrick@chromium.org
+ikilpatrick for modules/csspaint
danakj@chromium.org changed reviewers: + senorblanco@chromium.org
+senorblanco for modules/canvas2d
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by danakj@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
Overall this looks good (+1 to no ForTesting in *Test.cpp) but I think there's a real android compile failure.
lgtm provided that Android compile is fixed
The CQ bit was checked by danakj@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
ikilpatrick: ping. should i find a higher level reviewer? I think the android thing was just TOT at the time. Trying the bots again.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...) win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/...)
On 2017/04/20 22:57:13, danakj wrote: > ikilpatrick: ping. should i find a higher level reviewer? > > I think the android thing was just TOT at the time. Trying the bots again. lgtm, however just one question related to csspaint: In the case of the kExpensiveRecordingStackDepth fallback - is useful/important to fallback even if the RecordingImageBufferSurface is just being used for one frame? (The csspaint api has a new PRC2D each frame).
On 2017/04/21 04:45:45, ikilpatrick wrote: > On 2017/04/20 22:57:13, danakj wrote: > > ikilpatrick: ping. should i find a higher level reviewer? > > > > I think the android thing was just TOT at the time. Trying the bots again. > > lgtm, however just one question related to csspaint: > > In the case of the kExpensiveRecordingStackDepth fallback - is useful/important > to fallback even if the RecordingImageBufferSurface is just being used for one > frame? > (The csspaint api has a new PRC2D each frame). My understanding is no. The point of the fallback is to flatten the recording so its not very expensive to play back over and over. Thanks!
Oh I see the error, I was looking at something on one bot that wasn't me. I need to upcast the return type to match with gcc.
The CQ bit was checked by danakj@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from ikilpatrick@chromium.org, xlai@chromium.org, senorblanco@chromium.org Link to the patchset: https://codereview.chromium.org/2833593002/#ps80001 (title: "imagebuffersurface-cleanups: fix-compile")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by danakj@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from ikilpatrick@chromium.org, xlai@chromium.org, senorblanco@chromium.org Link to the patchset: https://codereview.chromium.org/2833593002/#ps100001 (title: "imagebuffersurface-cleanups: morefixcompile")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 100001, "attempt_start_ts": 1492794172784030, "parent_rev": "2a99e9e1b32d0218d1e13a88bb6a7db80dc4a970", "commit_rev": "a07bd8034e0ebf854efb8cd80eb7d543d7b8b228"}
Message was sent while issue was closed.
Description was changed from ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. - Use IntRect::Contains instead of writing that with comparisons. - Remove "ForTesting" from a class name defined in tests, its also redundant with the Fake prefix that is already present. - Some capitalization/punctuation for comments. R=pdr@chromium.org, xlai@chromium.org BUG=671433 ========== to ========== Remove unneeded abstractions and simplify RecordingImageBufferSurface This is a set of misc cleanups I found while rearranging code around RecordingImageBufferSurface in order to remove PaintCanvas::writePixels. - Replaces WrapUnique with MakeUnique. - Removes the unneeded factory abstraction, since all instances of it make an UnacceleratedImageBufferSurface. - Removes unneeded friend relationship from RecordingImageBufferSurface to its unit tests. - Change tests to check IsRecording() instead of peeking internals or checking if the factory was used. IsRecording() is true if we did not fall back to UnacceleratedImageBufferSurface and false otherwise, which is what the tests want to know. - Use IntRect::Contains instead of writing that with comparisons. - Remove "ForTesting" from a class name defined in tests, its also redundant with the Fake prefix that is already present. - Some capitalization/punctuation for comments. R=pdr@chromium.org, xlai@chromium.org BUG=671433 Review-Url: https://codereview.chromium.org/2833593002 Cr-Commit-Position: refs/heads/master@{#466397} Committed: https://chromium.googlesource.com/chromium/src/+/a07bd8034e0ebf854efb8cd80eb7... ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/a07bd8034e0ebf854efb8cd80eb7...
Message was sent while issue was closed.
On 2017/04/21 14:52:11, danakj wrote: > On 2017/04/21 04:45:45, ikilpatrick wrote: > > On 2017/04/20 22:57:13, danakj wrote: > > > ikilpatrick: ping. should i find a higher level reviewer? > > > > > > I think the android thing was just TOT at the time. Trying the bots again. > > > > lgtm, however just one question related to csspaint: > > > > In the case of the kExpensiveRecordingStackDepth fallback - is > useful/important > > to fallback even if the RecordingImageBufferSurface is just being used for one > > frame? > > (The csspaint api has a new PRC2D each frame). > > My understanding is no. The point of the fallback is to flatten the recording so > its not very expensive to play back over and over. Thanks! Should RecordingImageBufferSurface take an additional bool then to prevent fallback for the PRC2D case?
Message was sent while issue was closed.
On 2017/04/21 23:22:52, ikilpatrick wrote: > On 2017/04/21 14:52:11, danakj wrote: > > On 2017/04/21 04:45:45, ikilpatrick wrote: > > > On 2017/04/20 22:57:13, danakj wrote: > > > > ikilpatrick: ping. should i find a higher level reviewer? > > > > > > > > I think the android thing was just TOT at the time. Trying the bots again. > > > > > > lgtm, however just one question related to csspaint: > > > > > > In the case of the kExpensiveRecordingStackDepth fallback - is > > useful/important > > > to fallback even if the RecordingImageBufferSurface is just being used for > one > > > frame? > > > (The csspaint api has a new PRC2D each frame). > > > > My understanding is no. The point of the fallback is to flatten the recording > so > > its not very expensive to play back over and over. Thanks! > > Should RecordingImageBufferSurface take an additional bool then to prevent > fallback for the PRC2D case? Ok ya sure. I'll add an AllowFallback enum to the constructor in another CL since this landed.
Message was sent while issue was closed.
Patchset #7 (id:120001) has been deleted
Message was sent while issue was closed.
On 2017/04/25 21:46:40, danakj wrote: > On 2017/04/21 23:22:52, ikilpatrick wrote: > > On 2017/04/21 14:52:11, danakj wrote: > > > On 2017/04/21 04:45:45, ikilpatrick wrote: > > > > On 2017/04/20 22:57:13, danakj wrote: > > > > > ikilpatrick: ping. should i find a higher level reviewer? > > > > > > > > > > I think the android thing was just TOT at the time. Trying the bots > again. > > > > > > > > lgtm, however just one question related to csspaint: > > > > > > > > In the case of the kExpensiveRecordingStackDepth fallback - is > > > useful/important > > > > to fallback even if the RecordingImageBufferSurface is just being used for > > one > > > > frame? > > > > (The csspaint api has a new PRC2D each frame). > > > > > > My understanding is no. The point of the fallback is to flatten the > recording > > so > > > its not very expensive to play back over and over. Thanks! > > > > Should RecordingImageBufferSurface take an additional bool then to prevent > > fallback for the PRC2D case? > > Ok ya sure. I'll add an AllowFallback enum to the constructor in another CL > since this landed. Sounds great, thanks :). |