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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 years, 4 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 (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 void incrementFrameCount() { m_usageCounters.numFramesSinceReset++; }; 173 void incrementFrameCount() { m_usageCounters.numFramesSinceReset++; };
174 174
175 private: 175 private:
176 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; 176 friend class CanvasRenderingContext2DAutoRestoreSkCanvas;
177 177
178 CanvasRenderingContext2D(HTMLCanvasElement*, const CanvasContextCreationAttr ibutes& attrs, Document&); 178 CanvasRenderingContext2D(HTMLCanvasElement*, const CanvasContextCreationAttr ibutes& attrs, Document&);
179 179
180 void dispose(); 180 void dispose();
181 181
182 void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*); 182 void dispatchContextLostEvent(TimerBase*);
183 void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*); 183 void dispatchContextRestoredEvent(TimerBase*);
184 void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*); 184 void tryRestoreContextEvent(TimerBase*);
185 185
186 void unwindStateStack(); 186 void unwindStateStack();
187 187
188 void pruneLocalFontCache(size_t targetSize); 188 void pruneLocalFontCache(size_t targetSize);
189 void schedulePruneLocalFontCacheIfNeeded(); 189 void schedulePruneLocalFontCacheIfNeeded();
190 190
191 void scrollPathIntoViewInternal(const Path&); 191 void scrollPathIntoViewInternal(const Path&);
192 192
193 void drawTextInternal(const String&, double x, double y, CanvasRenderingCont ext2DState::PaintType, double* maxWidth = nullptr); 193 void drawTextInternal(const String&, double x, double y, CanvasRenderingCont ext2DState::PaintType, double* maxWidth = nullptr);
194 194
(...skipping 29 matching lines...) Expand all
224 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; 224 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle;
225 bool m_pruneLocalFontCacheScheduled; 225 bool m_pruneLocalFontCacheScheduled;
226 ListHashSet<String> m_fontLRUList; 226 ListHashSet<String> m_fontLRUList;
227 }; 227 };
228 228
229 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 229 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
230 230
231 } // namespace blink 231 } // namespace blink
232 232
233 #endif // CanvasRenderingContext2D_h 233 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698