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

Unified Diff: src/core/SkNormalSource.h

Issue 2080993002: Added API for Bevel NormalSource. (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-diffuse-api-change
Patch Set: Style fixes, serialization fixes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkNormalSource.h
diff --git a/src/core/SkNormalSource.h b/src/core/SkNormalSource.h
index e46e2dae34cc84d5fdf0e2877f2c21968f1fff13..e87003e4c22ec10f9371c8b60ecebbcb67fd0f5d 100644
--- a/src/core/SkNormalSource.h
+++ b/src/core/SkNormalSource.h
@@ -69,6 +69,20 @@ public:
*/
static sk_sp<SkNormalSource> MakeFlat();
+ enum class BevelType {
egdaniel 2016/07/14 17:23:30 Can you add comment on what these different BevelT
dvonbeck 2016/07/19 23:00:13 Do you know if I can change my source file's encod
egdaniel 2016/07/19 23:31:26 I wouldn't change the encoding. Just describe in m
dvonbeck 2016/07/22 15:08:22 Done.
+ kLinear,
+ kRoundedOut,
+ kRoundedIn
+ };
+ /** Returns a normal source that generates a bevel for the given shape. UNIMPLEMENTED: Will
+ return straight-up normals only.
+
+ @param type the type of bevel to add
+ @param width the width of the bevel, in source space
+ @param height the height of the plateau, in source space
+ */
+ static sk_sp<SkNormalSource> MakeBevel(BevelType, SkScalar width, SkScalar height);
egdaniel 2016/07/14 17:23:30 We need more info in the comments here. What happe
dvonbeck 2016/07/22 15:08:22 Done.
+
SK_DEFINE_FLATTENABLE_TYPE(SkNormalSource)
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
};
« no previous file with comments | « gm/lightingshader.cpp ('k') | src/core/SkNormalSource.cpp » ('j') | src/core/SkNormalSource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698