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

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

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify xfermodes, fix SkLayerDrawLooper Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 #ifndef SkEmptyShader_DEFINED 8 #ifndef SkEmptyShader_DEFINED
9 #define SkEmptyShader_DEFINED 9 #define SkEmptyShader_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 virtual size_t contextSize() const SK_OVERRIDE { 23 virtual size_t contextSize() const SK_OVERRIDE {
24 // Even though createContext returns NULL we have to return a value of a t least 24 // Even though createContext returns NULL we have to return a value of a t least
25 // sizeof(SkShader::Context) to satisfy SkSmallAllocator. 25 // sizeof(SkShader::Context) to satisfy SkSmallAllocator.
26 return sizeof(SkShader::Context); 26 return sizeof(SkShader::Context);
27 } 27 }
28 28
29 SK_TO_STRING_OVERRIDE() 29 SK_TO_STRING_OVERRIDE()
30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader) 30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader)
31 31
32 protected: 32 protected:
33 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
33 SkEmptyShader(SkReadBuffer& buffer) : INHERITED(buffer) {} 34 SkEmptyShader(SkReadBuffer& buffer) : INHERITED(buffer) {}
35 #endif
34 36
35 virtual SkShader::Context* onCreateContext(const ContextRec&, void*) const S K_OVERRIDE { 37 virtual SkShader::Context* onCreateContext(const ContextRec&, void*) const S K_OVERRIDE {
36 return NULL; 38 return NULL;
37 } 39 }
38 40
39 private: 41 private:
40 typedef SkShader INHERITED; 42 typedef SkShader INHERITED;
41 }; 43 };
42 44
43 #endif 45 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698