OLD | NEW |
(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(const SkShader::AsFPArgs&) co
nst override; |
| 19 #endif |
| 20 |
| 21 SkNormalSource::Provider* asProvider(const SkShader::ContextRec& rec, |
| 22 void* storage) const override; |
| 23 size_t providerSize(const SkShader::ContextRec& rec) const override; |
| 24 |
| 25 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkNormalFlatSourceImpl) |
| 26 |
| 27 protected: |
| 28 void flatten(SkWriteBuffer& buf) const override; |
| 29 |
| 30 private: |
| 31 class Provider : public SkNormalSource::Provider { |
| 32 public: |
| 33 Provider(); |
| 34 |
| 35 virtual ~Provider(); |
| 36 |
| 37 void fillScanLine(int x, int y, SkPoint3 output[], int count) const over
ride; |
| 38 |
| 39 private: |
| 40 typedef SkNormalSource::Provider INHERITED; |
| 41 }; |
| 42 |
| 43 friend class SkNormalSource; |
| 44 |
| 45 typedef SkNormalSource INHERITED; |
| 46 }; |
| 47 |
| 48 #endif |
OLD | NEW |