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

Issue 2050773002: Refactoring of CPU NormalMap handling out into its own class (Closed)

Created:
4 years, 6 months ago by dvonbeck
Modified:
4 years, 5 months ago
Reviewers:
egdaniel, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@dvonbeck-normals-gpu-cl
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

SkLightingShader normal vector CPU computation refactor. The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources. This CL's base was the CL for GPU handling: https://codereview.chromium.org/2043393002/ What this CL includes: - A refactor of the SkLightingShader context's code that deals with reading normals off of a normal map. This is now abstracted out into a NormalSource::Provider class that the context uses. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050773002 Committed: https://skia.googlesource.com/skia/+/790a70118327a129cb6b48fabe80f4e184c1e67c Committed: https://skia.googlesource.com/skia/+/12c4fc2579017a162668db077e8067512fd968ca

Patch Set 1 #

Patch Set 2 : Fixed segfault #

Patch Set 3 : Rebased, refactored, fixed style, comments #

Patch Set 4 : Fixed small mistake #

Patch Set 5 : Small rebase #

Patch Set 6 : Got rid of variable-length arrays #

Total comments: 6

Patch Set 7 : Addressed review, based NormalMapSource on BitmapShader #

Patch Set 8 : Took NormalSource class out of SkLS scope #

Patch Set 9 : Updated Flattenable_type enum name #

Total comments: 2

Patch Set 10 : Some comments #

Patch Set 11 : Changed API and docs according to code review #

Patch Set 12 : Quick variable name fix #

Total comments: 2

Patch Set 13 : Added override keyword to virtual overriding destructors #

Patch Set 14 : SkLS Context dependencies now allocated on the heap #

Unified diffs Side-by-side diffs Delta from patch set Stats (+427 lines, -417 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M include/core/SkFlattenable.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkLightingShader.h View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -51 lines 0 comments Download
M src/core/SkLightingShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 chunks +46 lines, -73 lines 0 comments Download
M src/core/SkLightingShader_NormalSource.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -290 lines 0 comments Download
A src/core/SkNormalSource.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +76 lines, -0 lines 0 comments Download
A src/core/SkNormalSource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +294 lines, -0 lines 0 comments Download
M src/ports/SkGlobalInitialization_default.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (16 generated)
dvonbeck
4 years, 6 months ago (2016-06-14 17:35:04 UTC) #6
egdaniel
+Mike to check all the needed scan line stuff is added correctly https://codereview.chromium.org/2050773002/diff/100001/src/core/SkLightingShader.cpp File src/core/SkLightingShader.cpp ...
4 years, 6 months ago (2016-06-16 13:48:10 UTC) #7
egdaniel
actually adding reed this time
4 years, 6 months ago (2016-06-16 13:48:34 UTC) #9
dvonbeck
I just uploaded a BitmapShader-backed NormalMapSource. It still has deeply nested classes, but there's less ...
4 years, 6 months ago (2016-06-16 22:05:40 UTC) #11
dvonbeck
I refactored NormalSource out into it's own header file. There's no 3 levels of scope ...
4 years, 6 months ago (2016-06-20 14:23:20 UTC) #12
reed1
https://codereview.chromium.org/2050773002/diff/160001/src/core/SkLightingShader.h File src/core/SkLightingShader.h (left): https://codereview.chromium.org/2050773002/diff/160001/src/core/SkLightingShader.h#oldcode59 src/core/SkLightingShader.h:59: static sk_sp<NormalSource> MakeMap(const SkBitmap& normal, const SkVector& invNormRotation, 0. ...
4 years, 6 months ago (2016-06-20 15:00:39 UTC) #13
dvonbeck
https://codereview.chromium.org/2050773002/diff/160001/src/core/SkLightingShader.h File src/core/SkLightingShader.h (left): https://codereview.chromium.org/2050773002/diff/160001/src/core/SkLightingShader.h#oldcode59 src/core/SkLightingShader.h:59: static sk_sp<NormalSource> MakeMap(const SkBitmap& normal, const SkVector& invNormRotation, On ...
4 years, 6 months ago (2016-06-20 20:03:58 UTC) #14
dvonbeck
Review comments were addressed.
4 years, 6 months ago (2016-06-24 15:25:41 UTC) #15
egdaniel
This looks fine to me, Mike is there anything else you want to change/add here?
4 years, 5 months ago (2016-06-27 13:47:16 UTC) #16
reed1
lgtm https://codereview.chromium.org/2050773002/diff/220001/src/core/SkNormalSource.h File src/core/SkNormalSource.h (right): https://codereview.chromium.org/2050773002/diff/220001/src/core/SkNormalSource.h#newcode18 src/core/SkNormalSource.h:18: virtual ~SkNormalSource(); nit: ~SkNormalSource() override;
4 years, 5 months ago (2016-06-27 14:28:20 UTC) #17
dvonbeck
https://codereview.chromium.org/2050773002/diff/220001/src/core/SkNormalSource.h File src/core/SkNormalSource.h (right): https://codereview.chromium.org/2050773002/diff/220001/src/core/SkNormalSource.h#newcode18 src/core/SkNormalSource.h:18: virtual ~SkNormalSource(); On 2016/06/27 14:28:20, reed1 wrote: > nit: ...
4 years, 5 months ago (2016-06-27 15:18:09 UTC) #18
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/2050773002/240001
4 years, 5 months ago (2016-06-27 15:19:12 UTC) #21
commit-bot: I haz the power
Committed patchset #13 (id:240001) as https://skia.googlesource.com/skia/+/790a70118327a129cb6b48fabe80f4e184c1e67c
4 years, 5 months ago (2016-06-27 15:44:02 UTC) #23
dvonbeck
A revert of this CL (patchset #13 id:240001) has been created in https://codereview.chromium.org/2101653002/ by dvonbeck@google.com. ...
4 years, 5 months ago (2016-06-27 16:30:10 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2050773002/260001
4 years, 5 months ago (2016-06-27 17:36:20 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-27 18:08:23 UTC) #29
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/2050773002/260001
4 years, 5 months ago (2016-06-27 18:39:49 UTC) #32
commit-bot: I haz the power
4 years, 5 months ago (2016-06-27 18:40:51 UTC) #34
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://skia.googlesource.com/skia/+/12c4fc2579017a162668db077e8067512fd968ca

Powered by Google App Engine
This is Rietveld 408576698