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

Issue 2833593002: Remove unneeded abstractions and simplify RecordingImageBufferSurface (Closed)

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.

Description

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/+/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)
danakj
xlai: please review pdr: owners stamps https://codereview.chromium.org/2833593002/diff/20001/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp File third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp (left): https://codereview.chromium.org/2833593002/diff/20001/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp#oldcode94 third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp:94: new RecordingImageBufferSurface(size, nullptr ...
3 years, 8 months ago (2017-04-19 21:16:36 UTC) #6
danakj
+ikilpatrick for modules/csspaint
3 years, 8 months ago (2017-04-19 21:17:17 UTC) #8
danakj
+senorblanco for modules/canvas2d
3 years, 8 months ago (2017-04-19 21:17:48 UTC) #10
Stephen White
LGTM
3 years, 8 months ago (2017-04-19 21:39:46 UTC) #15
pdr.
Overall this looks good (+1 to no ForTesting in *Test.cpp) but I think there's a ...
3 years, 8 months ago (2017-04-19 23:28:31 UTC) #18
xlai (Olivia)
lgtm provided that Android compile is fixed
3 years, 8 months ago (2017-04-20 14:20:09 UTC) #19
danakj
ikilpatrick: ping. should i find a higher level reviewer? I think the android thing was ...
3 years, 8 months ago (2017-04-20 22:57:13 UTC) #22
ikilpatrick
On 2017/04/20 22:57:13, danakj wrote: > ikilpatrick: ping. should i find a higher level reviewer? ...
3 years, 8 months ago (2017-04-21 04:45:45 UTC) #25
danakj
On 2017/04/21 04:45:45, ikilpatrick wrote: > On 2017/04/20 22:57:13, danakj wrote: > > ikilpatrick: ping. ...
3 years, 8 months ago (2017-04-21 14:52:11 UTC) #26
danakj
Oh I see the error, I was looking at something on one bot that wasn't ...
3 years, 8 months ago (2017-04-21 15:38:13 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2833593002/80001
3 years, 8 months ago (2017-04-21 15:38:39 UTC) #30
commit-bot: I haz the power
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_swarming_rel/builds/162668)
3 years, 8 months ago (2017-04-21 16:08:10 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2833593002/100001
3 years, 8 months ago (2017-04-21 17:03:20 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/a07bd8034e0ebf854efb8cd80eb7d543d7b8b228
3 years, 8 months ago (2017-04-21 18:36:21 UTC) #38
ikilpatrick
On 2017/04/21 14:52:11, danakj wrote: > On 2017/04/21 04:45:45, ikilpatrick wrote: > > On 2017/04/20 ...
3 years, 8 months ago (2017-04-21 23:22:52 UTC) #39
danakj
On 2017/04/21 23:22:52, ikilpatrick wrote: > On 2017/04/21 14:52:11, danakj wrote: > > On 2017/04/21 ...
3 years, 8 months ago (2017-04-25 21:46:40 UTC) #40
ikilpatrick
3 years, 8 months ago (2017-04-25 22:54:49 UTC) #42
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 :).

Powered by Google App Engine
This is Rietveld 408576698