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

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

Issue 2080993002: Added API for Bevel NormalSource. (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-diffuse-api-change
Patch Set: fixed unused field Created 4 years, 4 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
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkNormalBevelSource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SkNormalBevelSource_DEFINED
9 #define SkNormalBevelSource_DEFINED
10
11 #include "SkNormalSource.h"
12
13 class SK_API SkNormalBevelSourceImpl : public SkNormalSource {
14 public:
15 SkNormalBevelSourceImpl(BevelType type, SkScalar width, SkScalar height)
16 : fType(type)
17 , fWidth(width)
18 , fHeight(height) {}
19
20 #if SK_SUPPORT_GPU
21 sk_sp<GrFragmentProcessor> asFragmentProcessor(const SkShader::AsFPArgs&) co nst override;
22 #endif
23
24 SkNormalSource::Provider* asProvider(const SkShader::ContextRec& rec,
25 void* storage) const override;
26 size_t providerSize(const SkShader::ContextRec& rec) const override;
27
28 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkNormalBevelSourceImpl)
29
30 protected:
31 void flatten(SkWriteBuffer& buf) const override;
32
33 private:
34 class Provider : public SkNormalSource::Provider {
35 public:
36 Provider();
37
38 virtual ~Provider();
39
40 void fillScanLine(int x, int y, SkPoint3 output[], int count) const over ride;
41
42 private:
43 typedef SkNormalSource::Provider INHERITED;
44
45 };
46
47 SkNormalSource::BevelType fType;
48 SkScalar fWidth;
49 SkScalar fHeight;
50
51 friend class SkNormalSource;
52
53 typedef SkNormalSource INHERITED;
54 };
55
56
57 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkNormalBevelSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698