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

Unified Diff: src/core/SkNormalSourceImpl.h

Issue 2043393002: Refactoring of GPU NormalMap handling out into its own class (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 6 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/SkNormalSourceImpl.h
diff --git a/src/core/SkNormalSourceImpl.h b/src/core/SkNormalSourceImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..a32e0d4146fcac5cb3b5f2784ec539f99627ec25
--- /dev/null
+++ b/src/core/SkNormalSourceImpl.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkNormalSourceImpl_DEFINED
+#define SkNormalSourceImpl_DEFINED
+
+#include "SkBitmapProcState.h"
+#include "SkColor.h"
+#include "SkEmptyShader.h"
+#include "SkErrorInternals.h"
+#include "SkLightingShader.h"
+#include "SkMathPriv.h"
+#include "SkPoint3.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
+#include "SkNormalSourceImpl.h"
+#include "GrCoordTransform.h"
+#include "GrFragmentProcessor.h"
+#include "GrInvariantOutput.h"
+#include "GrTextureAccess.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentShaderBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
+#include "glsl/GrGLSLUniformHandler.h"
+#include "SkGr.h"
+#include "SkGrPriv.h"
+
+// TODO change to flattenable
+class NormalSource : public SkRefCnt {
+
+public:
+
+ virtual ~NormalSource(){};
+
+ virtual const GrFragmentProcessor* asFragmentProcessor(
+ GrContext* context,
+ const SkMatrix& viewM,
+ const SkMatrix* localMatrix,
+ SkFilterQuality filterQuality,
+ SkSourceGammaTreatment gammaTreatment) const = 0;
+};
+
+class NormalMapSource {
+public:
+ static sk_sp<NormalSource> Make(const SkBitmap& normal, const SkVector& invNormRotation,
+ const SkMatrix* normLocalM);
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698