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

Issue 27476007: DM: duh, don't calculate digests unless we're going to look at them. (Closed)

Created:
7 years, 2 months ago by mtklein
Modified:
7 years, 1 month ago
Reviewers:
bungeman-skia, epoger
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

DM: duh, don't calculate digests unless we're going to look at them. This doesn't cut the runtime significantly (~6s either way) but it does cut the CPU time down from ~10s to ~6s. BUG= Committed: http://code.google.com/p/skia/source/detail?r=11826

Patch Set 1 #

Total comments: 2

Patch Set 2 : brace preference #

Patch Set 3 : sync and merge #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -24 lines) Patch
M dm/DMComparisonTask.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M dm/DMCpuTask.cpp View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M dm/DMReplayTask.h View 3 chunks +3 lines, -5 lines 1 comment Download
M dm/DMReplayTask.cpp View 1 2 3 chunks +8 lines, -6 lines 0 comments Download
M dm/DMUtil.h View 2 chunks +3 lines, -3 lines 0 comments Download
M dm/DMUtil.cpp View 1 chunk +6 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
mtklein
7 years, 2 months ago (2013-10-16 13:29:13 UTC) #1
mtklein
7 years, 2 months ago (2013-10-16 16:07:04 UTC) #2
bungeman-skia
lgtm https://codereview.chromium.org/27476007/diff/1/dm/DMReplayTask.cpp File dm/DMReplayTask.cpp (right): https://codereview.chromium.org/27476007/diff/1/dm/DMReplayTask.cpp#newcode39 dm/DMReplayTask.cpp:39: 0 != memcmp(bitmap.getPixels(), fReference.getPixels(), bitmap.getSize())) { I know ...
7 years, 2 months ago (2013-10-16 17:22:54 UTC) #3
mtklein
https://codereview.chromium.org/27476007/diff/1/dm/DMReplayTask.cpp File dm/DMReplayTask.cpp (right): https://codereview.chromium.org/27476007/diff/1/dm/DMReplayTask.cpp#newcode39 dm/DMReplayTask.cpp:39: 0 != memcmp(bitmap.getPixels(), fReference.getPixels(), bitmap.getSize())) { On 2013/10/16 17:22:54, ...
7 years, 2 months ago (2013-10-16 17:27:47 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@google.com/27476007/9001
7 years, 2 months ago (2013-10-16 18:30:29 UTC) #5
commit-bot: I haz the power
Change committed as 11826
7 years, 2 months ago (2013-10-16 19:13:42 UTC) #6
epoger
https://codereview.chromium.org/27476007/diff/9001/dm/DMReplayTask.h File dm/DMReplayTask.h (right): https://codereview.chromium.org/27476007/diff/9001/dm/DMReplayTask.h#newcode13 dm/DMReplayTask.h:13: // Records a GM through an SkPicture, draws it, ...
7 years, 2 months ago (2013-10-17 16:14:01 UTC) #7
mtklein
7 years, 2 months ago (2013-10-17 16:34:06 UTC) #8
Message was sent while issue was closed.
On 2013/10/17 16:14:01, epoger wrote:
> https://codereview.chromium.org/27476007/diff/9001/dm/DMReplayTask.h
> File dm/DMReplayTask.h (right):
> 
> https://codereview.chromium.org/27476007/diff/9001/dm/DMReplayTask.h#newcode13
> dm/DMReplayTask.h:13: // Records a GM through an SkPicture, draws it, and
> compares against the reference bitmap.
> The question is, will DM have the reference bitmap to compare against?  Or
will
> it be comparing against a checksum?
> 
> On Android, we typically want to compare against a checksum (i.e. image hash).

> Otherwise, we have to copy all the reference images down to the device where
you
> are rendering the test images.  It's much faster to just copy down the
> checksums.

Yes, the reference bitmap will always exist here.  We'll always be looking at
two freshly-minted in-memory bitmaps: the one ReplayTask just finished drawing,
and the one the corresponding CpuTask drew as the reference.  That reference
bitmap in turn is what we compare with a checksum, if given.  DM will definitely
always support---and indeed currently only supports---checksum expectations.

Powered by Google App Engine
This is Rietveld 408576698