| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkBlitter.h" | 8 #include "SkBlitter.h" |
| 9 #include "SkAntiRun.h" | 9 #include "SkAntiRun.h" |
| 10 #include "SkColor.h" | 10 #include "SkColor.h" |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 this->INHERITED::toString(str); | 714 this->INHERITED::toString(str); |
| 715 | 715 |
| 716 str->append(")"); | 716 str->append(")"); |
| 717 } | 717 } |
| 718 #endif | 718 #endif |
| 719 | 719 |
| 720 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk3DShader) | 720 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk3DShader) |
| 721 | 721 |
| 722 protected: | 722 protected: |
| 723 void flatten(SkWriteBuffer& buffer) const override { | 723 void flatten(SkWriteBuffer& buffer) const override { |
| 724 buffer.writeFlattenable(fProxy.get()); | 724 buffer.writeFlattenable("fProxy", fProxy.get()); |
| 725 } | 725 } |
| 726 | 726 |
| 727 private: | 727 private: |
| 728 sk_sp<SkShader> fProxy; | 728 sk_sp<SkShader> fProxy; |
| 729 | 729 |
| 730 typedef SkShader INHERITED; | 730 typedef SkShader INHERITED; |
| 731 }; | 731 }; |
| 732 | 732 |
| 733 sk_sp<SkFlattenable> Sk3DShader::CreateProc(SkReadBuffer& buffer) { | 733 sk_sp<SkFlattenable> Sk3DShader::CreateProc(SkReadBuffer& buffer) { |
| 734 return sk_make_sp<Sk3DShader>(buffer.readShader()); | 734 return sk_make_sp<Sk3DShader>(buffer.readShader()); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 fShaderContext->~Context(); | 1002 fShaderContext->~Context(); |
| 1003 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext); | 1003 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext); |
| 1004 if (nullptr == ctx) { | 1004 if (nullptr == ctx) { |
| 1005 // Need a valid context in fShaderContext's storage, so we can later (or
our caller) call | 1005 // Need a valid context in fShaderContext's storage, so we can later (or
our caller) call |
| 1006 // the in-place destructor. | 1006 // the in-place destructor. |
| 1007 new (fShaderContext) SkZeroShaderContext(*fShader, rec); | 1007 new (fShaderContext) SkZeroShaderContext(*fShader, rec); |
| 1008 return false; | 1008 return false; |
| 1009 } | 1009 } |
| 1010 return true; | 1010 return true; |
| 1011 } | 1011 } |
| OLD | NEW |