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

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

Issue 808703006: remove view matrix from context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: one more fix Created 6 years 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 | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkImageFilter.cpp » ('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 * Copyright 2007 The Android Open Source Project 2 * Copyright 2007 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 #ifndef SkColorShader_DEFINED 8 #ifndef SkColorShader_DEFINED
9 #define SkColorShader_DEFINED 9 #define SkColorShader_DEFINED
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 typedef SkShader::Context INHERITED; 47 typedef SkShader::Context INHERITED;
48 }; 48 };
49 49
50 // we return false for this, use asAGradient 50 // we return false for this, use asAGradient
51 virtual BitmapType asABitmap(SkBitmap* outTexture, 51 virtual BitmapType asABitmap(SkBitmap* outTexture,
52 SkMatrix* outMatrix, 52 SkMatrix* outMatrix,
53 TileMode xy[2]) const SK_OVERRIDE; 53 TileMode xy[2]) const SK_OVERRIDE;
54 54
55 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; 55 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
56 56
57 virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix* , GrColor*, 57 virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM,
58 const SkMatrix*, GrColor*,
58 GrFragmentProcessor**) const SK_OVERRIDE; 59 GrFragmentProcessor**) const SK_OVERRIDE;
59 60
60 SK_TO_STRING_OVERRIDE() 61 SK_TO_STRING_OVERRIDE()
61 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) 62 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader)
62 63
63 protected: 64 protected:
64 SkColorShader(SkReadBuffer&); 65 SkColorShader(SkReadBuffer&);
65 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 66 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
66 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE; 67 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE;
67 virtual bool onAsLuminanceColor(SkColor* lum) const SK_OVERRIDE { 68 virtual bool onAsLuminanceColor(SkColor* lum) const SK_OVERRIDE {
68 *lum = fColor; 69 *lum = fColor;
69 return true; 70 return true;
70 } 71 }
71 72
72 private: 73 private:
73 SkColor fColor; 74 SkColor fColor;
74 75
75 typedef SkShader INHERITED; 76 typedef SkShader INHERITED;
76 }; 77 };
77 78
78 #endif 79 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698