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

Side by Side Diff: Source/platform/graphics/GraphicsContextState.h

Issue 661053003: Make beginLayer() and CanvasRenderingContext2D use SkXfermode::Mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to ToT Created 5 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
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void setTextDrawingMode(TextDrawingModeFlags mode) { m_textDrawingMode = mod e; } 120 void setTextDrawingMode(TextDrawingModeFlags mode) { m_textDrawingMode = mod e; }
121 121
122 // Common shader state. 122 // Common shader state.
123 int alpha() const { return m_alpha; } 123 int alpha() const { return m_alpha; }
124 void setAlphaAsFloat(float); 124 void setAlphaAsFloat(float);
125 125
126 SkColorFilter* colorFilter() const { return m_colorFilter.get(); } 126 SkColorFilter* colorFilter() const { return m_colorFilter.get(); }
127 void setColorFilter(PassRefPtr<SkColorFilter>); 127 void setColorFilter(PassRefPtr<SkColorFilter>);
128 128
129 // Compositing control, for the CSS and Canvas compositing spec. 129 // Compositing control, for the CSS and Canvas compositing spec.
130 void setCompositeOperation(CompositeOperator, WebBlendMode); 130 void setCompositeOperation(SkXfermode::Mode);
131 CompositeOperator compositeOperator() const { return m_compositeOperator; } 131 SkXfermode::Mode compositeOperation() const { return m_compositeOperation; }
132 WebBlendMode blendMode() const { return m_blendMode; }
133 132
134 // Image interpolation control. 133 // Image interpolation control.
135 InterpolationQuality interpolationQuality() const { return m_interpolationQu ality; } 134 InterpolationQuality interpolationQuality() const { return m_interpolationQu ality; }
136 void setInterpolationQuality(InterpolationQuality); 135 void setInterpolationQuality(InterpolationQuality);
137 136
138 bool shouldAntialias() const { return m_shouldAntialias; } 137 bool shouldAntialias() const { return m_shouldAntialias; }
139 void setShouldAntialias(bool); 138 void setShouldAntialias(bool);
140 139
141 bool shouldClampToSourceRect() const { return m_shouldClampToSourceRect; } 140 bool shouldClampToSourceRect() const { return m_shouldClampToSourceRect; }
142 void setShouldClampToSourceRect(bool shouldClampToSourceRect) { m_shouldClam pToSourceRect = shouldClampToSourceRect; } 141 void setShouldClampToSourceRect(bool shouldClampToSourceRect) { m_shouldClam pToSourceRect = shouldClampToSourceRect; }
(...skipping 27 matching lines...) Expand all
170 RefPtr<Pattern> m_fillPattern; 169 RefPtr<Pattern> m_fillPattern;
171 170
172 RefPtr<SkDrawLooper> m_looper; 171 RefPtr<SkDrawLooper> m_looper;
173 RefPtr<SkImageFilter> m_dropShadowImageFilter; 172 RefPtr<SkImageFilter> m_dropShadowImageFilter;
174 173
175 TextDrawingModeFlags m_textDrawingMode; 174 TextDrawingModeFlags m_textDrawingMode;
176 175
177 int m_alpha; 176 int m_alpha;
178 RefPtr<SkColorFilter> m_colorFilter; 177 RefPtr<SkColorFilter> m_colorFilter;
179 178
180 CompositeOperator m_compositeOperator; 179 SkXfermode::Mode m_compositeOperation;
181 WebBlendMode m_blendMode;
182 180
183 InterpolationQuality m_interpolationQuality; 181 InterpolationQuality m_interpolationQuality;
184 182
185 uint16_t m_saveCount; 183 uint16_t m_saveCount;
186 184
187 bool m_shouldAntialias : 1; 185 bool m_shouldAntialias : 1;
188 bool m_shouldClampToSourceRect : 1; 186 bool m_shouldClampToSourceRect : 1;
189 }; 187 };
190 188
191 } // namespace blink 189 } // namespace blink
192 190
193 #endif // GraphicsContextState_h 191 #endif // GraphicsContextState_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/GraphicsContextState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698