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

Issue 2043393002: Refactoring of GPU NormalMap handling out into its own class (Closed)

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

Description

Refactoring of GPU NormalMap handling out into its own class. 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. What this CL includes: - Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP. - Encapsulates this new fragment processor on a new class NormalMapSource. - Created a NormalSource abstraction that will interface with SkLightingShader. - Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043393002 Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da Committed: https://skia.googlesource.com/skia/+/a7d1e2a57aef2aa4913d4380646d60bbab761318 Committed: https://skia.googlesource.com/skia/+/8811e40850ac3310c17fe8cdaffe72817a5e317d

Patch Set 1 #

Total comments: 26

Patch Set 2 : Rebased, unified headers, NormalSource is now serialized, addressed patch 1 comments #

Total comments: 28

Patch Set 3 : Refactoring, style fixes #

Total comments: 14

Patch Set 4 : More style fixes, comments, rebasing #

Patch Set 5 : Small comment fix #

Total comments: 12

Patch Set 6 : Addressed patch 5 comments #

Patch Set 7 : Removed use of VLAs, sufixed floats with 'f' #

Patch Set 8 : Moved include out of #if SK_SUPPORT_GPU #

Patch Set 9 : Fixed memory leak on serializationtest #

Patch Set 10 : Fixed SK_API flags, got rid of NormalMapSource::Make #

Unified diffs Side-by-side diffs Delta from patch set Stats (+457 lines, -117 lines) Patch
M gyp/core.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkFlattenable.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkBitmapProcShader.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M src/core/SkBitmapProcShader.cpp View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M src/core/SkLightingShader.h View 1 2 3 4 5 6 7 8 9 1 chunk +49 lines, -0 lines 0 comments Download
M src/core/SkLightingShader.cpp View 1 2 3 4 5 6 7 8 9 16 chunks +62 lines, -115 lines 0 comments Download
A src/core/SkLightingShader_NormalSource.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +290 lines, -0 lines 0 comments Download
M src/ports/SkGlobalInitialization_default.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M tests/SerializationTest.cpp View 1 2 3 4 5 6 7 8 4 chunks +41 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 54 (25 generated)
dvonbeck
4 years, 6 months ago (2016-06-08 19:17:52 UTC) #4
egdaniel
I know you are working on changes to clean up some of this, but here ...
4 years, 6 months ago (2016-06-09 16:56:38 UTC) #6
dvonbeck
https://codereview.chromium.org/2043393002/diff/1/src/core/SkLightingShader.cpp File src/core/SkLightingShader.cpp (right): https://codereview.chromium.org/2043393002/diff/1/src/core/SkLightingShader.cpp#newcode17 src/core/SkLightingShader.cpp:17: #include "SkNormalSourceImpl.h" On 2016/06/09 16:56:37, egdaniel wrote: > we ...
4 years, 6 months ago (2016-06-09 18:51:29 UTC) #8
egdaniel
https://codereview.chromium.org/2043393002/diff/1/src/core/SkNormalSourceImpl.cpp File src/core/SkNormalSourceImpl.cpp (right): https://codereview.chromium.org/2043393002/diff/1/src/core/SkNormalSourceImpl.cpp#newcode91 src/core/SkNormalSourceImpl.cpp:91: inout->mulByUnknownFourComponents(); On 2016/06/09 18:51:29, dvonbeck wrote: > On 2016/06/09 ...
4 years, 6 months ago (2016-06-10 14:23:28 UTC) #9
dvonbeck
Pls look at SkFlattenable comment: https://codereview.chromium.org/2043393002/diff/20001/src/core/SkLightingShader.h#newcode20 https://codereview.chromium.org/2043393002/diff/1/src/core/SkNormalSourceImpl.cpp File src/core/SkNormalSourceImpl.cpp (right): https://codereview.chromium.org/2043393002/diff/1/src/core/SkNormalSourceImpl.cpp#newcode91 src/core/SkNormalSourceImpl.cpp:91: inout->mulByUnknownFourComponents(); On 2016/06/10 ...
4 years, 6 months ago (2016-06-10 15:22:29 UTC) #10
dvonbeck
Hi Mike, Here's the code changes I was talking about. All the comments marked with ...
4 years, 6 months ago (2016-06-10 18:31:22 UTC) #13
reed1
https://codereview.chromium.org/2043393002/diff/40001/src/core/SkBitmapProcShader.h File src/core/SkBitmapProcShader.h (right): https://codereview.chromium.org/2043393002/diff/40001/src/core/SkBitmapProcShader.h#newcode24 src/core/SkBitmapProcShader.h:24: static bool bitmapIsTooBig(const SkBitmap&); 1. Needs a comment explaining ...
4 years, 6 months ago (2016-06-10 19:15:24 UTC) #14
dvonbeck
https://codereview.chromium.org/2043393002/diff/40001/src/core/SkBitmapProcShader.h File src/core/SkBitmapProcShader.h (right): https://codereview.chromium.org/2043393002/diff/40001/src/core/SkBitmapProcShader.h#newcode24 src/core/SkBitmapProcShader.h:24: static bool bitmapIsTooBig(const SkBitmap&); On 2016/06/10 19:15:23, reed1 wrote: ...
4 years, 6 months ago (2016-06-10 21:00:16 UTC) #15
reed1
api lgtm
4 years, 6 months ago (2016-06-14 17:33:25 UTC) #17
egdaniel
https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.cpp File src/core/SkLightingShader.cpp (right): https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.cpp#newcode144 src/core/SkLightingShader.cpp:144: #include "SkBitmapProcShader.h" alphabetize this in include list (above SkGr.h) ...
4 years, 6 months ago (2016-06-14 18:30:45 UTC) #18
egdaniel
https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.h File src/core/SkLightingShader.h (right): https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.h#newcode100 src/core/SkLightingShader.h:100: static sk_sp<SkShader> Make(const SkBitmap& diffuse, const SkBitmap& normal, On ...
4 years, 6 months ago (2016-06-14 18:35:48 UTC) #19
dvonbeck
https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.cpp File src/core/SkLightingShader.cpp (right): https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.cpp#newcode144 src/core/SkLightingShader.cpp:144: #include "SkBitmapProcShader.h" On 2016/06/14 18:30:45, egdaniel wrote: > alphabetize ...
4 years, 6 months ago (2016-06-14 18:41:44 UTC) #20
egdaniel
https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.cpp File src/core/SkLightingShader.cpp (right): https://codereview.chromium.org/2043393002/diff/80001/src/core/SkLightingShader.cpp#newcode144 src/core/SkLightingShader.cpp:144: #include "SkBitmapProcShader.h" On 2016/06/14 18:41:44, dvonbeck wrote: > On ...
4 years, 6 months ago (2016-06-14 19:01:19 UTC) #21
egdaniel
lgtm
4 years, 6 months ago (2016-06-14 19:26:56 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2043393002/100001
4 years, 6 months ago (2016-06-14 19:32:16 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/9194)
4 years, 6 months ago (2016-06-14 19:40:47 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2043393002/120001
4 years, 6 months ago (2016-06-14 21:30:54 UTC) #30
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da
4 years, 6 months ago (2016-06-14 21:43:56 UTC) #32
egdaniel
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2062133004/ by egdaniel@google.com. ...
4 years, 6 months ago (2016-06-14 22:29:58 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2043393002/140001
4 years, 6 months ago (2016-06-15 15:26:17 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2043393002/160001
4 years, 6 months ago (2016-06-15 16:53:06 UTC) #41
dvonbeck
On 2016/06/15 16:53:06, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 6 months ago (2016-06-15 17:29:48 UTC) #42
dvonbeck
On 2016/06/15 17:29:48, dvonbeck wrote: > On 2016/06/15 16:53:06, commit-bot: I haz the power wrote: ...
4 years, 6 months ago (2016-06-15 17:52:13 UTC) #43
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://skia.googlesource.com/skia/+/a7d1e2a57aef2aa4913d4380646d60bbab761318
4 years, 6 months ago (2016-06-15 19:08:00 UTC) #45
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-15 19:08:02 UTC) #46
egdaniel
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2068983005/ by egdaniel@google.com. ...
4 years, 6 months ago (2016-06-15 21:28:02 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2043393002/180001
4 years, 6 months ago (2016-06-16 19:18:17 UTC) #51
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://skia.googlesource.com/skia/+/8811e40850ac3310c17fe8cdaffe72817a5e317d
4 years, 6 months ago (2016-06-16 19:39:32 UTC) #53
commit-bot: I haz the power
4 years, 6 months ago (2016-06-16 19:39:34 UTC) #54
Message was sent while issue was closed.
CQ bit was unchecked

Powered by Google App Engine
This is Rietveld 408576698