OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void resetUsageTracking(); | 193 void resetUsageTracking(); |
194 | 194 |
195 void finalizeFrame() override { m_usageCounters.numFramesSinceReset++; } | 195 void finalizeFrame() override { m_usageCounters.numFramesSinceReset++; } |
196 | 196 |
197 bool isPaintable() const final { return hasImageBuffer(); } | 197 bool isPaintable() const final { return hasImageBuffer(); } |
198 | 198 |
199 ColorBehavior drawImageColorBehavior() const final; | 199 ColorBehavior drawImageColorBehavior() const final; |
200 | 200 |
201 void willDrawImage(CanvasImageSource*) const final; | 201 void willDrawImage(CanvasImageSource*) const final; |
202 | 202 |
| 203 CanvasRenderingContext* renderingContext() const final; |
| 204 |
203 private: | 205 private: |
204 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; | 206 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; |
205 | 207 |
206 CanvasRenderingContext2D(HTMLCanvasElement*, | 208 CanvasRenderingContext2D(HTMLCanvasElement*, |
207 const CanvasContextCreationAttributes& attrs, | 209 const CanvasContextCreationAttributes& attrs, |
208 Document&); | 210 Document&); |
209 | 211 |
210 void dispatchContextLostEvent(TimerBase*); | 212 void dispatchContextLostEvent(TimerBase*); |
211 void dispatchContextRestoredEvent(TimerBase*); | 213 void dispatchContextRestoredEvent(TimerBase*); |
212 void tryRestoreContextEvent(TimerBase*); | 214 void tryRestoreContextEvent(TimerBase*); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 261 |
260 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, | 262 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, |
261 CanvasRenderingContext, | 263 CanvasRenderingContext, |
262 context, | 264 context, |
263 context->is2d() && context->canvas(), | 265 context->is2d() && context->canvas(), |
264 context.is2d() && context.canvas()); | 266 context.is2d() && context.canvas()); |
265 | 267 |
266 } // namespace blink | 268 } // namespace blink |
267 | 269 |
268 #endif // CanvasRenderingContext2D_h | 270 #endif // CanvasRenderingContext2D_h |
OLD | NEW |