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

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

Issue 2276583003: SkScalerContextRec::computeMatrices to return status. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | src/core/SkScalerContext.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 SkScalerContext_DEFINED 8 #ifndef SkScalerContext_DEFINED
9 #define SkScalerContext_DEFINED 9 #define SkScalerContext_DEFINED
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 * underlying library will not be used, often when working directly with fo nt data. 139 * underlying library will not be used, often when working directly with fo nt data.
140 * 140 *
141 * The parameters 'scale' and 'remaining' are required, the other pointers may be nullptr. 141 * The parameters 'scale' and 'remaining' are required, the other pointers may be nullptr.
142 * 142 *
143 * @param preMatrixScale the kind of scale to extract from the total matrix . 143 * @param preMatrixScale the kind of scale to extract from the total matrix .
144 * @param scale the scale extracted from the total matrix (both values posi tive). 144 * @param scale the scale extracted from the total matrix (both values posi tive).
145 * @param remaining apply after scale to apply the total matrix. 145 * @param remaining apply after scale to apply the total matrix.
146 * @param remainingWithoutRotation apply after scale to apply the total mat rix sans rotation. 146 * @param remainingWithoutRotation apply after scale to apply the total mat rix sans rotation.
147 * @param remainingRotation apply after remainingWithoutRotation to apply t he total matrix. 147 * @param remainingRotation apply after remainingWithoutRotation to apply t he total matrix.
148 * @param total the total matrix. 148 * @param total the total matrix.
149 * @return false if the matrix was singular. The output will be valid but n ot invertable.
149 */ 150 */
150 void computeMatrices(PreMatrixScale preMatrixScale, 151 bool computeMatrices(PreMatrixScale preMatrixScale,
151 SkVector* scale, SkMatrix* remaining, 152 SkVector* scale, SkMatrix* remaining,
152 SkMatrix* remainingWithoutRotation = nullptr, 153 SkMatrix* remainingWithoutRotation = nullptr,
153 SkMatrix* remainingRotation = nullptr, 154 SkMatrix* remainingRotation = nullptr,
154 SkMatrix* total = nullptr); 155 SkMatrix* total = nullptr);
155 156
156 inline SkPaint::Hinting getHinting() const; 157 inline SkPaint::Hinting getHinting() const;
157 inline void setHinting(SkPaint::Hinting); 158 inline void setHinting(SkPaint::Hinting);
158 159
159 SkMask::Format getFormat() const { 160 SkMask::Format getFormat() const {
160 return static_cast<SkMask::Format>(fMaskFormat); 161 return static_cast<SkMask::Format>(fMaskFormat);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return static_cast<SkPaint::Hinting>(hint); 381 return static_cast<SkPaint::Hinting>(hint);
381 } 382 }
382 383
383 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 384 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
384 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 385 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
385 (hinting << SkScalerContext::kHinting_Shift); 386 (hinting << SkScalerContext::kHinting_Shift);
386 } 387 }
387 388
388 389
389 #endif 390 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698