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

Side by Side Diff: src/effects/gradients/Sk4fGradientBase.cpp

Issue 1726983002: Retire SkShader::kSupports4f_Flag (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: kPrefers4f_Flag Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
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 #include "Sk4fGradientBase.h" 8 #include "Sk4fGradientBase.h"
9 9
10 namespace { 10 namespace {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 bool SkGradientShaderBase::GradientShaderBase4fContext:: 57 bool SkGradientShaderBase::GradientShaderBase4fContext::
58 Interval::contains(SkScalar fx) const { 58 Interval::contains(SkScalar fx) const {
59 return in_range(fx, fP0, fP1); 59 return in_range(fx, fP0, fP1);
60 } 60 }
61 61
62 SkGradientShaderBase:: 62 SkGradientShaderBase::
63 GradientShaderBase4fContext::GradientShaderBase4fContext(const SkGradientShaderB ase& shader, 63 GradientShaderBase4fContext::GradientShaderBase4fContext(const SkGradientShaderB ase& shader,
64 const ContextRec& rec) 64 const ContextRec& rec)
65 : INHERITED(shader, rec) 65 : INHERITED(shader, rec)
66 , fFlags(this->INHERITED::getFlags() | kSupports4f_Flag) 66 , fFlags(this->INHERITED::getFlags())
67 #ifdef SK_SUPPORT_LEGACY_GRADIENT_DITHERING 67 #ifdef SK_SUPPORT_LEGACY_GRADIENT_DITHERING
68 , fDither(true) 68 , fDither(true)
69 #else 69 #else
70 , fDither(rec.fPaint->isDither()) 70 , fDither(rec.fPaint->isDither())
71 #endif 71 #endif
72 { 72 {
73 // The main job here is to build an interval list. Intervals are a differen t 73 // The main job here is to build an interval list. Intervals are a differen t
74 // representation of the color stops data, optimized for efficient scan line 74 // representation of the color stops data, optimized for efficient scan line
75 // access during shading. 75 // access during shading.
76 // 76 //
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } else { 257 } else {
258 SkASSERT(in_range(fx, i->fP1, i1->fP1)); 258 SkASSERT(in_range(fx, i->fP1, i1->fP1));
259 i0 = i + 1; 259 i0 = i + 1;
260 } 260 }
261 } 261 }
262 262
263 SkASSERT(in_range(fx, i0->fP0, i0->fP1)); 263 SkASSERT(in_range(fx, i0->fP0, i0->fP1));
264 return i0; 264 return i0;
265 } 265 }
266 } 266 }
OLDNEW
« no previous file with comments | « src/core/SkShader.cpp ('k') | tests/SkColor4fTest.cpp » ('j') | tests/SkColor4fTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698