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

Issue 16406006: Improve batching of drawBitmap* calls (Closed)

Created:
7 years, 6 months ago by robertphillips
Modified:
7 years, 6 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

This improves the draw call batching of drawBitmap* calls. Currently it really only helps on full texture draws. Partial texture draws use the TextureDomain which adds an additional uniform. This doesn't appear to make a difference on Windows. On the Nexus 7 we get (old on left; new on right): game_trans_full_atlas_aa GPU c 167.57 164.61 +2.96 +1.8% game_rot_partial_aa GPU c 236.12 208.01 +28.11 +11.9% game_scale_partial_aa GPU c 273.26 214.15 +59.11 +21.6% game_trans_partial_aa GPU c 277.89 210.14 +67.75 +24.4% game_trans_aligned_full_aa GPU c 180.02 95.54 +84.48 +46.9% game_trans_aligned_partial_aa GPU c 257.32 128.24 +129.08 +50.2% game_scale_full_aa GPU c 189.13 93.92 +95.21 +50.3% game_trans_full_aa GPU c 181.53 90.13 +91.40 +50.3% game_rot_full_aa GPU c 182.57 81.52 +101.05 +55.3% The better improvement on the "full" cases is somewhat expected since the draw overhead of the drawBitmap* calls is greater (i.e., it isn't being offset by a lot of calls to drawRect). On Mac Intel integrated we get (old on left; new on right): game_trans_full_atlas_aa GPU c 46.11 49.06 -2.95 -6.4% game_scale_partial_aa GPU c 38.05 28.15 +9.90 +26.0% game_rot_partial_aa GPU c 38.61 24.57 +14.04 +36.4% game_trans_aligned_partial_aa GPU c 36.51 18.05 +18.46 +50.6% game_trans_full_aa GPU c 30.95 13.82 +17.13 +55.3% game_rot_full_aa GPU c 31.78 12.42 +19.36 +60.9% game_trans_aligned_full_aa GPU c 30.99 10.43 +20.56 +66.3% game_scale_full_aa GPU c 31.90 10.64 +21.26 +66.6% game_trans_partial_aa GPU c 55.45 15.36 +40.09 +72.3% Note that we don't expect any changes in "game_trans_full_atlas_aa" (since it uses TextureDomain) so it can be used as a gauge of noise.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed code review issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M include/gpu/GrEffectStage.h View 1 2 chunks +7 lines, -1 line 0 comments Download
M src/gpu/GrDrawState.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
robertphillips
7 years, 6 months ago (2013-06-10 16:45:07 UTC) #1
bsalomon
lgtm, nice numbers https://codereview.chromium.org/16406006/diff/1/include/gpu/GrEffectStage.h File include/gpu/GrEffectStage.h (left): https://codereview.chromium.org/16406006/diff/1/include/gpu/GrEffectStage.h#oldcode169 include/gpu/GrEffectStage.h:169: bool isEqual(const GrEffectStage& stage) const { ...
7 years, 6 months ago (2013-06-10 17:03:57 UTC) #2
robertphillips
7 years, 6 months ago (2013-06-10 22:07:34 UTC) #3
committed as r9499

https://codereview.chromium.org/16406006/diff/1/include/gpu/GrEffectStage.h
File include/gpu/GrEffectStage.h (left):

https://codereview.chromium.org/16406006/diff/1/include/gpu/GrEffectStage.h#o...
include/gpu/GrEffectStage.h:169: bool isEqual(const GrEffectStage& stage) const
{
On 2013/06/10 17:03:57, bsalomon wrote:
> Can we call it something like ignoreCoordChange or something... just to
clarify
> what matrix is being ignored.

Done.

Powered by Google App Engine
This is Rietveld 408576698