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

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

Issue 1189223002: Remove gamma field from SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup DistanceAdjustTable Created 5 years, 6 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/SkPaint.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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef SkDeviceProperties_DEFINED 8 #ifndef SkDeviceProperties_DEFINED
9 #define SkDeviceProperties_DEFINED 9 #define SkDeviceProperties_DEFINED
10 10
11 #include "SkSurfacePriv.h" 11 #include "SkSurfacePriv.h"
12 12
13 struct SkDeviceProperties { 13 struct SkDeviceProperties {
14 SkDeviceProperties(const SkDeviceProperties& src) 14 SkDeviceProperties(const SkDeviceProperties& src)
15 : fGamma(src.fGamma) 15 : fUseDFT(src.fUseDFT)
16 , fUseDFT(src.fUseDFT)
17 , fPixelGeometry(src.fPixelGeometry) { 16 , fPixelGeometry(src.fPixelGeometry) {
18 } 17 }
19 18
20 SkDeviceProperties(float gamma = SK_GAMMA_EXPONENT) 19 SkDeviceProperties()
21 : fGamma(gamma) 20 : fUseDFT(false)
22 , fUseDFT(false)
23 , fPixelGeometry(SkSurfacePropsDefaultPixelGeometry()) 21 , fPixelGeometry(SkSurfacePropsDefaultPixelGeometry())
24 {} 22 {}
25 23
26 SkDeviceProperties(SkPixelGeometry geo, bool useDFT = false, float gamma = S K_GAMMA_EXPONENT) 24 SkDeviceProperties(SkPixelGeometry geo, bool useDFT = false)
27 : fGamma(gamma) 25 : fUseDFT(useDFT)
28 , fUseDFT(useDFT)
29 , fPixelGeometry(geo) 26 , fPixelGeometry(geo)
30 {} 27 {}
31 28
32 float gamma() const { return fGamma; }
33 bool useDFT() const { return fUseDFT; } 29 bool useDFT() const { return fUseDFT; }
34 SkPixelGeometry pixelGeometry() const { return fPixelGeometry; } 30 SkPixelGeometry pixelGeometry() const { return fPixelGeometry; }
35 31
36 void setPixelGeometry(SkPixelGeometry geo) { 32 void setPixelGeometry(SkPixelGeometry geo) {
37 fPixelGeometry = geo; 33 fPixelGeometry = geo;
38 } 34 }
39 35
40 private: 36 private:
41 const float fGamma;
42 const bool fUseDFT; 37 const bool fUseDFT;
43 SkPixelGeometry fPixelGeometry; 38 SkPixelGeometry fPixelGeometry;
44 }; 39 };
45 40
46 #endif 41 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698