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

Issue 494503002: Expose IsSolidColor and write units tests (Closed)

Created:
6 years, 4 months ago by hendrikw
Modified:
6 years, 3 months ago
Reviewers:
danakj, vmpstr, enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Expose IsSolidColor and write units tests AnalysisRaster was needed because we must run the analysis on a separate thread. My second attempt placed the analysis in the picturepileimpl, but, as vmpstr predicted, this caused issues when software rasterizing since it uses yet another thread. The way around all of this was to write another raster function without the: DCHECK(raster_thread_checker_.CalledOnValidThread()); We're calling the Analysis before any synchronization occures with impl so it should be safe to call without the check. BUG=396908 Committed: https://crrev.com/c60f5fbb953fb80e7f36cb7885e6f6c8b8494439 Cr-Commit-Position: refs/heads/master@{#292044}

Patch Set 1 #

Patch Set 2 : initialized some variables #

Total comments: 11

Patch Set 3 : Fixed Vmpstr's issues #

Total comments: 14

Patch Set 4 : Fix for review commetns #

Patch Set 5 : See what people think of the ResetThreadChecker approach #

Patch Set 6 : It turns out that we could end up with nullptr entries in the map somehow. I hit the dcheck, so I'… #

Patch Set 7 : chrome elves fixed my problem #

Patch Set 8 : Merge with most recent again #

Total comments: 4

Patch Set 9 : Updated comments #

Total comments: 1

Patch Set 10 : Fixed a build break and set solid to false on empty picturemap #

Patch Set 11 : Fix a mac specific build break #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -5 lines) Patch
M cc/resources/picture.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/resources/picture.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M cc/resources/picture_pile.h View 1 chunk +7 lines, -0 lines 0 comments Download
M cc/resources/picture_pile.cc View 1 2 3 4 5 6 7 8 9 4 chunks +40 lines, -1 line 0 comments Download
M cc/resources/picture_pile_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +58 lines, -4 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
hendrikw
Hi all, since I've lost the ability to keep solid state in the SkPictureData, I'm ...
6 years, 4 months ago (2014-08-19 23:16:27 UTC) #1
vmpstr
https://codereview.chromium.org/494503002/diff/20001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/494503002/diff/20001/cc/resources/picture.cc#newcode440 cc/resources/picture.cc:440: return bounds.width() * bounds.height(); If you're not using this, ...
6 years, 4 months ago (2014-08-19 23:55:37 UTC) #2
hendrikw
Thanks, good finds! https://codereview.chromium.org/494503002/diff/20001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/494503002/diff/20001/cc/resources/picture.cc#newcode440 cc/resources/picture.cc:440: return bounds.width() * bounds.height(); On 2014/08/19 ...
6 years, 4 months ago (2014-08-20 00:34:06 UTC) #3
vmpstr
https://codereview.chromium.org/494503002/diff/40001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/494503002/diff/40001/cc/resources/picture.cc#newcode435 cc/resources/picture.cc:435: picture_->draw(canvas, NULL); Make a comment here please explaining why ...
6 years, 4 months ago (2014-08-20 16:12:01 UTC) #4
enne (OOO)
The thread checker stuff seems pretty dodgy to me. Can we just assume these days ...
6 years, 4 months ago (2014-08-20 17:47:39 UTC) #5
reveman
On 2014/08/20 17:47:39, enne wrote: > The thread checker stuff seems pretty dodgy to me. ...
6 years, 4 months ago (2014-08-20 17:57:24 UTC) #6
enne (OOO)
Ok, then if we still need the thread checker code for now, this current analysis ...
6 years, 4 months ago (2014-08-20 18:19:26 UTC) #7
hendrikw
On 2014/08/20 18:19:26, enne wrote: > Ok, then if we still need the thread checker ...
6 years, 4 months ago (2014-08-20 19:29:08 UTC) #8
vmpstr
On 2014/08/20 19:29:08, Hendrik wrote: > On 2014/08/20 18:19:26, enne wrote: > > Ok, then ...
6 years, 4 months ago (2014-08-20 19:43:22 UTC) #9
enne (OOO)
It seems like the right place to do this is on the main thread and ...
6 years, 4 months ago (2014-08-20 19:45:06 UTC) #10
hendrikw
On 2014/08/20 19:43:22, vmpstr wrote: > On 2014/08/20 19:29:08, Hendrik wrote: > > On 2014/08/20 ...
6 years, 4 months ago (2014-08-20 19:47:08 UTC) #11
danakj
It sounds from 100 feet away that you just need to Reset the thread checker ...
6 years, 4 months ago (2014-08-20 19:47:56 UTC) #12
hendrikw
On 2014/08/20 19:47:56, danakj wrote: > It sounds from 100 feet away that you just ...
6 years, 4 months ago (2014-08-20 19:57:35 UTC) #13
danakj
On Wed, Aug 20, 2014 at 3:57 PM, <hendrikw@chromium.org> wrote: > On 2014/08/20 19:47:56, danakj ...
6 years, 4 months ago (2014-08-20 20:00:20 UTC) #14
hendrikw
On 2014/08/20 19:57:35, Hendrik wrote: > On 2014/08/20 19:47:56, danakj wrote: > > It sounds ...
6 years, 4 months ago (2014-08-20 20:42:17 UTC) #15
hendrikw
Fix for review comments - next change will do the reset thread https://codereview.chromium.org/494503002/diff/40001/cc/resources/picture.cc File cc/resources/picture.cc ...
6 years, 4 months ago (2014-08-20 20:46:55 UTC) #16
danakj
On Wed, Aug 20, 2014 at 4:42 PM, <hendrikw@chromium.org> wrote: > On 2014/08/20 19:57:35, Hendrik ...
6 years, 4 months ago (2014-08-20 20:47:41 UTC) #17
hendrikw
Here's the ResetThreadChecker approach, I'll revert it if vmpstr and enne don't like it.
6 years, 4 months ago (2014-08-20 21:17:49 UTC) #18
hendrikw
I found a case where we have null pictures in the map. Fixed the code ...
6 years, 4 months ago (2014-08-20 21:54:03 UTC) #19
enne (OOO)
https://codereview.chromium.org/362073002 removes thread checker entirely. Can you rebase on top of that? On 2014/08/20 at ...
6 years, 4 months ago (2014-08-25 17:21:33 UTC) #20
hendrikw
For realz? My problem has been magically solved! Rebased and removed the ResetThreadChecker function
6 years, 4 months ago (2014-08-25 21:07:00 UTC) #21
hendrikw
On 2014/08/25 17:21:33, enne wrote: > On 2014/08/20 at 21:54:03, hendrikw wrote: > > I ...
6 years, 4 months ago (2014-08-25 21:10:36 UTC) #22
hendrikw
On 2014/08/25 21:10:36, Hendrik wrote: > On 2014/08/25 17:21:33, enne wrote: > > On 2014/08/20 ...
6 years, 4 months ago (2014-08-25 23:11:10 UTC) #23
enne (OOO)
Ok, now I remember what this is supposed to do. The map can have null ...
6 years, 3 months ago (2014-08-25 23:21:07 UTC) #24
hendrikw
So, what do we do when we try to rasterize a null picture? Do we ...
6 years, 3 months ago (2014-08-26 00:12:38 UTC) #25
enne (OOO)
lgtm On 2014/08/26 at 00:12:38, hendrikw wrote: > So, what do we do when we ...
6 years, 3 months ago (2014-08-26 17:03:40 UTC) #26
hendrikw
The CQ bit was checked by hendrikw@chromium.org
6 years, 3 months ago (2014-08-26 18:00:44 UTC) #27
hendrikw
The CQ bit was unchecked by hendrikw@chromium.org
6 years, 3 months ago (2014-08-26 18:01:22 UTC) #28
hendrikw
Fixed a build break and set solid to false on empty picturemap as Enne suggested. ...
6 years, 3 months ago (2014-08-26 20:57:06 UTC) #29
hendrikw
The CQ bit was checked by hendrikw@chromium.org
6 years, 3 months ago (2014-08-26 20:57:11 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hendrikw@chromium.org/494503002/180001
6 years, 3 months ago (2014-08-26 20:58:21 UTC) #31
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium.linux ...
6 years, 3 months ago (2014-08-26 22:15:13 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 3 months ago (2014-08-26 22:20:52 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg/builds/9617)
6 years, 3 months ago (2014-08-26 22:20:53 UTC) #34
hendrikw
Mac build break fix :(
6 years, 3 months ago (2014-08-26 23:04:06 UTC) #35
hendrikw
The CQ bit was checked by hendrikw@chromium.org
6 years, 3 months ago (2014-08-26 23:04:13 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hendrikw@chromium.org/494503002/200001
6 years, 3 months ago (2014-08-26 23:04:28 UTC) #37
commit-bot: I haz the power
Committed patchset #11 (200001) as d90354d437ce1680b9acbfbe8972034dde2ddfe9
6 years, 3 months ago (2014-08-27 00:09:14 UTC) #38
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:47:51 UTC) #39
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c60f5fbb953fb80e7f36cb7885e6f6c8b8494439
Cr-Commit-Position: refs/heads/master@{#292044}

Powered by Google App Engine
This is Rietveld 408576698