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

Side by Side Diff: src/core/SkNormalFlatSource.h

Issue 2080993002: Added API for Bevel NormalSource. (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-diffuse-api-change
Patch Set: Addressed patch 7 comments 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkNormalFlatSource_DEFINED
9 #define SkNormalFlatSource_DEFINED
10
11 #include "SkNormalSource.h"
12
13 class SK_API SkNormalFlatSourceImpl : public SkNormalSource {
14 public:
15 SkNormalFlatSourceImpl(){}
16
17 #if SK_SUPPORT_GPU
18 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
19 const SkMatrix& viewM,
20 const SkMatrix* localMatrix,
21 SkFilterQuality,
22 SkSourceGammaTreatment) const override;
23 #endif
24
25 SkNormalSource::Provider* asProvider(const SkShader::ContextRec& rec,
26 void* storage) const override;
27 size_t providerSize(const SkShader::ContextRec& rec) const override;
28
29 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkNormalFlatSourceImpl)
30
31 protected:
32 void flatten(SkWriteBuffer& buf) const override;
33
34 private:
35 class Provider : public SkNormalSource::Provider {
36 public:
37 Provider();
38
39 virtual ~Provider();
40
41 void fillScanLine(int x, int y, SkPoint3 output[], int count) const over ride;
42
43 private:
44 typedef SkNormalSource::Provider INHERITED;
45 };
46
47 friend class SkNormalSource;
48
49 typedef SkNormalSource INHERITED;
50 };
51
52 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698