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

Issue 1406403008: Reduce footprint of FilterEffectBuilder::build (Closed)

Created:
5 years, 1 month ago by fs
Modified:
5 years, 1 month ago
Reviewers:
Stephen White
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reduce footprint of FilterEffectBuilder::build Since we know the resulting size of the sepia(...) and grayscale(...) matrices, allocate the space for them up front, and then use uncheckedAppend(...) to reduce the code bloat from regular append(...). This strikes a balance between using float[20] (entirely unchecked but less code) and what's currently there. Move the setup of the matrices to helper functions to reduce the "weight" (cognitive load) of these two cases in the switch somewhat. Code size is reduced by ~1.35kB on x86-64/Linux. Committed: https://crrev.com/339ec33bc366ee9f757ef8a2ff93eb5183c38448 Cr-Commit-Position: refs/heads/master@{#357365}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -55 lines) Patch
M third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp View 2 chunks +71 lines, -55 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
fs
5 years, 1 month ago (2015-11-02 16:02:13 UTC) #2
Stephen White
LGTM
5 years, 1 month ago (2015-11-02 16:05:20 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406403008/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406403008/1
5 years, 1 month ago (2015-11-02 16:07:02 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 1 month ago (2015-11-02 16:22:29 UTC) #6
commit-bot: I haz the power
5 years, 1 month ago (2015-11-02 16:23:21 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/339ec33bc366ee9f757ef8a2ff93eb5183c38448
Cr-Commit-Position: refs/heads/master@{#357365}

Powered by Google App Engine
This is Rietveld 408576698