OLD | NEW |
1 // Copyright (C) 2013 Google Inc. All rights reserved. | 1 // Copyright (C) 2013 Google Inc. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following disclaimer | 10 // copyright notice, this list of conditions and the following disclaimer |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 WebBlendMode blendMode() const { return m_blendMode; } | 131 WebBlendMode blendMode() const { return m_blendMode; } |
132 SkXfermode* xferMode() const { return m_xferMode.get(); } | 132 SkXfermode* xferMode() const { return m_xferMode.get(); } |
133 | 133 |
134 // Image interpolation control. | 134 // Image interpolation control. |
135 InterpolationQuality interpolationQuality() const { return m_interpolationQu
ality; } | 135 InterpolationQuality interpolationQuality() const { return m_interpolationQu
ality; } |
136 void setInterpolationQuality(InterpolationQuality); | 136 void setInterpolationQuality(InterpolationQuality); |
137 | 137 |
138 bool shouldAntialias() const { return m_shouldAntialias; } | 138 bool shouldAntialias() const { return m_shouldAntialias; } |
139 void setShouldAntialias(bool); | 139 void setShouldAntialias(bool); |
140 | 140 |
141 bool shouldSmoothFonts() const { return m_shouldSmoothFonts; } | |
142 void setShouldSmoothFonts(bool shouldSmoothFonts) { m_shouldSmoothFonts = sh
ouldSmoothFonts; } | |
143 | |
144 bool shouldClampToSourceRect() const { return m_shouldClampToSourceRect; } | 141 bool shouldClampToSourceRect() const { return m_shouldClampToSourceRect; } |
145 void setShouldClampToSourceRect(bool shouldClampToSourceRect) { m_shouldClam
pToSourceRect = shouldClampToSourceRect; } | 142 void setShouldClampToSourceRect(bool shouldClampToSourceRect) { m_shouldClam
pToSourceRect = shouldClampToSourceRect; } |
146 | 143 |
147 private: | 144 private: |
148 GraphicsContextState(); | 145 GraphicsContextState(); |
149 explicit GraphicsContextState(const GraphicsContextState&); | 146 explicit GraphicsContextState(const GraphicsContextState&); |
150 GraphicsContextState& operator=(const GraphicsContextState&); | 147 GraphicsContextState& operator=(const GraphicsContextState&); |
151 | 148 |
152 // Helper function for applying the state's alpha value to the given input | 149 // Helper function for applying the state's alpha value to the given input |
153 // color to produce a new output color. | 150 // color to produce a new output color. |
(...skipping 23 matching lines...) Expand all Loading... |
177 RefPtr<SkColorFilter> m_colorFilter; | 174 RefPtr<SkColorFilter> m_colorFilter; |
178 | 175 |
179 CompositeOperator m_compositeOperator; | 176 CompositeOperator m_compositeOperator; |
180 WebBlendMode m_blendMode; | 177 WebBlendMode m_blendMode; |
181 | 178 |
182 InterpolationQuality m_interpolationQuality; | 179 InterpolationQuality m_interpolationQuality; |
183 | 180 |
184 uint16_t m_saveCount; | 181 uint16_t m_saveCount; |
185 | 182 |
186 bool m_shouldAntialias : 1; | 183 bool m_shouldAntialias : 1; |
187 bool m_shouldSmoothFonts : 1; | |
188 bool m_shouldClampToSourceRect : 1; | 184 bool m_shouldClampToSourceRect : 1; |
189 }; | 185 }; |
190 | 186 |
191 } // namespace blink | 187 } // namespace blink |
192 | 188 |
193 #endif // GraphicsContextState_h | 189 #endif // GraphicsContextState_h |
OLD | NEW |