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

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

Issue 563563002: make set3DMask virtual, so we can safely notify the shadercontext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ad gm Created 6 years, 3 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 | « gyp/gmslides.gypi ('k') | src/core/SkBitmapProcShader.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 * 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 8
9 #ifndef SkShader_DEFINED 9 #ifndef SkShader_DEFINED
10 #define SkShader_DEFINED 10 #define SkShader_DEFINED
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count); 178 virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count);
179 179
180 /** 180 /**
181 * Helper function that returns true if this shader's shadeSpan16() met hod 181 * Helper function that returns true if this shader's shadeSpan16() met hod
182 * can be called. 182 * can be called.
183 */ 183 */
184 bool canCallShadeSpan16() { 184 bool canCallShadeSpan16() {
185 return SkShader::CanCallShadeSpan16(this->getFlags()); 185 return SkShader::CanCallShadeSpan16(this->getFlags());
186 } 186 }
187 187
188 // Notification from blitter::blitMask in case we need to see the non-al pha channels
189 virtual void set3DMask(const SkMask*) {}
190
188 protected: 191 protected:
189 // Reference to shader, so we don't have to dupe information. 192 // Reference to shader, so we don't have to dupe information.
190 const SkShader& fShader; 193 const SkShader& fShader;
191 194
192 enum MatrixClass { 195 enum MatrixClass {
193 kLinear_MatrixClass, // no perspective 196 kLinear_MatrixClass, // no perspective
194 kFixedStepInX_MatrixClass, // fast perspective, need to call fi xedStepInX() each 197 kFixedStepInX_MatrixClass, // fast perspective, need to call fi xedStepInX() each
195 // scanline 198 // scanline
196 kPerspective_MatrixClass // slow perspective, need to mappoin ts each pixel 199 kPerspective_MatrixClass // slow perspective, need to mappoin ts each pixel
197 }; 200 };
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 // constructors. 501 // constructors.
499 SkMatrix fLocalMatrix; 502 SkMatrix fLocalMatrix;
500 503
501 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 504 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
502 friend class SkLocalMatrixShader; 505 friend class SkLocalMatrixShader;
503 506
504 typedef SkFlattenable INHERITED; 507 typedef SkFlattenable INHERITED;
505 }; 508 };
506 509
507 #endif 510 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698