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

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

Issue 1622983002: Revert[2] of expand unitests for color4f (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: call the generic destructor, so we go throught the virtual chain Created 4 years, 11 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 | « include/core/SkColorFilter.h ('k') | src/core/SkColor.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 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 #ifndef SkShader_DEFINED 8 #ifndef SkShader_DEFINED
9 #define SkShader_DEFINED 9 #define SkShader_DEFINED
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 /** 115 /**
116 * Called sometimes before drawing with this shader. Return the type of 116 * Called sometimes before drawing with this shader. Return the type of
117 * alpha your shader will return. The default implementation returns 0. 117 * alpha your shader will return. The default implementation returns 0.
118 * Your subclass should override if it can (even sometimes) report a 118 * Your subclass should override if it can (even sometimes) report a
119 * non-zero value, since that will enable various blitters to perform 119 * non-zero value, since that will enable various blitters to perform
120 * faster. 120 * faster.
121 */ 121 */
122 virtual uint32_t getFlags() const { return 0; } 122 virtual uint32_t getFlags() const { return 0; }
123 123
124 bool supports4f() const {
125 return SkToBool(this->getFlags() & kSupports4f_Flag);
126 }
127
124 /** 128 /**
125 * Called for each span of the object being drawn. Your subclass should 129 * Called for each span of the object being drawn. Your subclass should
126 * set the appropriate colors (with premultiplied alpha) that correspon d 130 * set the appropriate colors (with premultiplied alpha) that correspon d
127 * to the specified device coordinates. 131 * to the specified device coordinates.
128 */ 132 */
129 virtual void shadeSpan(int x, int y, SkPMColor[], int count) = 0; 133 virtual void shadeSpan(int x, int y, SkPMColor[], int count) = 0;
130 134
131 virtual void shadeSpan4f(int x, int y, SkPM4f[], int count); 135 virtual void shadeSpan4f(int x, int y, SkPM4f[], int count);
132 136
133 /** 137 /**
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 SkMatrix fLocalMatrix; 414 SkMatrix fLocalMatrix;
411 415
412 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 416 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
413 friend class SkLocalMatrixShader; 417 friend class SkLocalMatrixShader;
414 friend class SkBitmapProcShader; // for computeTotalInverse() 418 friend class SkBitmapProcShader; // for computeTotalInverse()
415 419
416 typedef SkFlattenable INHERITED; 420 typedef SkFlattenable INHERITED;
417 }; 421 };
418 422
419 #endif 423 #endif
OLDNEW
« no previous file with comments | « include/core/SkColorFilter.h ('k') | src/core/SkColor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698