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

Side by Side Diff: include/core/SkColorShader.h

Issue 318923005: SkShader::asNewEffect Refactoring (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: added macros to check for gpu support Created 6 years, 6 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 | « expectations/gm/ignored-tests.txt ('k') | include/core/SkShader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2007 The Android Open Source Project 3 * Copyright 2007 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkColorShader_DEFINED 10 #ifndef SkColorShader_DEFINED
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 typedef SkShader::Context INHERITED; 49 typedef SkShader::Context INHERITED;
50 }; 50 };
51 51
52 // we return false for this, use asAGradient 52 // we return false for this, use asAGradient
53 virtual BitmapType asABitmap(SkBitmap* outTexture, 53 virtual BitmapType asABitmap(SkBitmap* outTexture,
54 SkMatrix* outMatrix, 54 SkMatrix* outMatrix,
55 TileMode xy[2]) const SK_OVERRIDE; 55 TileMode xy[2]) const SK_OVERRIDE;
56 56
57 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; 57 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
58 58
59 virtual bool asNewEffect(GrContext* context, const SkPaint& paint,
60 const SkMatrix* localMatrix, GrColor* grColor,
61 GrEffectRef** grEffect) const SK_OVERRIDE;
62
59 SK_TO_STRING_OVERRIDE() 63 SK_TO_STRING_OVERRIDE()
60 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) 64 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader)
61 65
62 protected: 66 protected:
63 SkColorShader(SkReadBuffer&); 67 SkColorShader(SkReadBuffer&);
64 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 68 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
65 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE; 69 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE;
66 70
67 private: 71 private:
68 SkColor fColor; // ignored if fInheritColor is true 72 SkColor fColor; // ignored if fInheritColor is true
69 73
70 typedef SkShader INHERITED; 74 typedef SkShader INHERITED;
71 }; 75 };
72 76
73 #endif 77 #endif
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698