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

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

Issue 907453003: Move overdraw tracking code from GraphicsContext to CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 shouldClampToSourceRect() const { return m_shouldClampToSourceRect; } 141 bool shouldClampToSourceRect() const { return m_shouldClampToSourceRect; }
142 void setShouldClampToSourceRect(bool shouldClampToSourceRect) { m_shouldClam pToSourceRect = shouldClampToSourceRect; } 142 void setShouldClampToSourceRect(bool shouldClampToSourceRect) { m_shouldClam pToSourceRect = shouldClampToSourceRect; }
143 143
144 // Returns true if clip is more than just a rectangle or intersection
145 // of rectangles.
146 bool hasComplexClip() const;
147 void setHasComplexClip();
148
149 private: 144 private:
150 GraphicsContextState(); 145 GraphicsContextState();
151 explicit GraphicsContextState(const GraphicsContextState&); 146 explicit GraphicsContextState(const GraphicsContextState&);
152 GraphicsContextState& operator=(const GraphicsContextState&); 147 GraphicsContextState& operator=(const GraphicsContextState&);
153 148
154 // 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
155 // color to produce a new output color. 150 // color to produce a new output color.
156 SkColor applyAlpha(SkColor color) const 151 SkColor applyAlpha(SkColor color) const
157 { 152 {
158 return multiplyAlpha(color, m_alpha); 153 return multiplyAlpha(color, m_alpha);
(...skipping 23 matching lines...) Expand all
182 RefPtr<SkColorFilter> m_colorFilter; 177 RefPtr<SkColorFilter> m_colorFilter;
183 178
184 SkXfermode::Mode m_compositeOperation; 179 SkXfermode::Mode m_compositeOperation;
185 180
186 InterpolationQuality m_interpolationQuality; 181 InterpolationQuality m_interpolationQuality;
187 182
188 uint16_t m_saveCount; 183 uint16_t m_saveCount;
189 184
190 bool m_shouldAntialias : 1; 185 bool m_shouldAntialias : 1;
191 bool m_shouldClampToSourceRect : 1; 186 bool m_shouldClampToSourceRect : 1;
192 bool m_hasComplexClip : 1;
193 }; 187 };
194 188
195 } // namespace blink 189 } // namespace blink
196 190
197 #endif // GraphicsContextState_h 191 #endif // GraphicsContextState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698