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

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

Issue 2320663002: Fix performance regression in WebGL to 2D canvas draws. (Closed)
Patch Set: Created 4 years, 3 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 AffineTransform baseTransform() const final; 161 AffineTransform baseTransform() const final;
162 void didDraw(const SkIRect& dirtyRect) final; 162 void didDraw(const SkIRect& dirtyRect) final;
163 163
164 bool stateHasFilter() final; 164 bool stateHasFilter() final;
165 SkImageFilter* stateGetFilter() final; 165 SkImageFilter* stateGetFilter() final;
166 void snapshotStateForFilter() final; 166 void snapshotStateForFilter() final;
167 167
168 void validateStateStack() final; 168 void validateStateStack() final;
169 169
170 PassRefPtr<Image> getImage(SnapshotReason) const final; 170 PassRefPtr<Image> getImage(AccelerationHint, SnapshotReason) const final;
171 171
172 bool isAccelerationOptimalForCanvasContent() const; 172 bool isAccelerationOptimalForCanvasContent() const;
173 173
174 void resetUsageTracking(); 174 void resetUsageTracking();
175 175
176 void incrementFrameCount() { m_usageCounters.numFramesSinceReset++; } 176 void incrementFrameCount() { m_usageCounters.numFramesSinceReset++; }
177 177
178 bool isPaintable() const final { return hasImageBuffer(); } 178 bool isPaintable() const final { return hasImageBuffer(); }
179 179
180 private: 180 private:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 bool m_pruneLocalFontCacheScheduled; 229 bool m_pruneLocalFontCacheScheduled;
230 ListHashSet<String> m_fontLRUList; 230 ListHashSet<String> m_fontLRUList;
231 }; 231 };
232 232
233 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, 233 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context,
234 context->is2d() && context->canvas(), context.is2d() && context.canvas()); 234 context->is2d() && context->canvas(), context.is2d() && context.canvas());
235 235
236 } // namespace blink 236 } // namespace blink
237 237
238 #endif // CanvasRenderingContext2D_h 238 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698