Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; | 216 friend class CanvasRenderingContext2DAutoRestoreSkCanvas; |
| 217 | 217 |
| 218 CanvasRenderingContext2D(HTMLCanvasElement*, const CanvasContextCreationAttr ibutes& attrs, Document&); | 218 CanvasRenderingContext2D(HTMLCanvasElement*, const CanvasContextCreationAttr ibutes& attrs, Document&); |
| 219 | 219 |
| 220 CanvasRenderingContext2DState& modifiableState(); | 220 CanvasRenderingContext2DState& modifiableState(); |
| 221 const CanvasRenderingContext2DState& state() const { return *m_stateStack.la st(); } | 221 const CanvasRenderingContext2DState& state() const { return *m_stateStack.la st(); } |
| 222 | 222 |
| 223 void applyLineDash() const; | 223 void applyLineDash() const; |
| 224 void setShadow(const FloatSize& offset, float blur, RGBA32 color); | 224 void setShadow(const FloatSize& offset, float blur, RGBA32 color); |
| 225 void applyShadow(ShadowMode = DrawShadowAndForeground); | 225 void applyShadow(ShadowMode = DrawShadowAndForeground); |
| 226 bool shouldDrawShadows() const; | |
| 227 | 226 |
| 228 void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*); | 227 void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*); |
| 229 void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*); | 228 void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*); |
| 230 void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*); | 229 void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*); |
| 231 | 230 |
| 232 bool computeDirtyRect(const FloatRect& localBounds, SkIRect*); | 231 bool computeDirtyRect(const FloatRect& localBounds, SkIRect*); |
| 233 bool computeDirtyRect(const FloatRect& localBounds, const SkIRect& transform edClipBounds, SkIRect*); | 232 bool computeDirtyRect(const FloatRect& localBounds, const SkIRect& transform edClipBounds, SkIRect*); |
| 234 void didDraw(const SkIRect&); | 233 void didDraw(const SkIRect&); |
| 235 | 234 |
| 236 GraphicsContext* drawingContext() const; // Deprecated: use drawingCanvas | 235 GraphicsContext* drawingContext() const; // Deprecated: use drawingCanvas |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 254 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false); | 253 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false); |
| 255 | 254 |
| 256 const Font& accessFont(); | 255 const Font& accessFont(); |
| 257 int getFontBaseline(const FontMetrics&) const; | 256 int getFontBaseline(const FontMetrics&) const; |
| 258 | 257 |
| 259 void clearCanvas(); | 258 void clearCanvas(); |
| 260 bool rectContainsTransformedRect(const FloatRect&, const SkIRect&) const; | 259 bool rectContainsTransformedRect(const FloatRect&, const SkIRect&) const; |
| 261 | 260 |
| 262 void inflateStrokeRect(FloatRect&) const; | 261 void inflateStrokeRect(FloatRect&) const; |
| 263 | 262 |
| 264 void fullCanvasCompositedDraw(PassOwnPtr<Closure> draw); | 263 void fullCanvasCompositedDraw(PassOwnPtr<Closure> draw); // deprecated |
|
Stephen White
2015/03/19 20:35:17
Could you log a bug for updating/removing this dep
Justin Novosad
2015/03/19 21:03:36
I already have to remove this function as a part o
Stephen White
2015/03/24 15:52:05
Acknowledged.
| |
| 264 void fullCanvasCompositedDraw(PassOwnPtr<Function<void(SkCanvas*, const SkPa int*)>>, CanvasPaintType, CanvasShadowStrategy); | |
| 265 | 265 |
| 266 void drawFocusIfNeededInternal(const Path&, Element*); | 266 void drawFocusIfNeededInternal(const Path&, Element*); |
| 267 bool focusRingCallIsValid(const Path&, Element*); | 267 bool focusRingCallIsValid(const Path&, Element*); |
| 268 void drawFocusRing(const Path&); | 268 void drawFocusRing(const Path&); |
| 269 void updateFocusRingElementAccessibility(const Path&, Element*); | 269 void updateFocusRingElementAccessibility(const Path&, Element*); |
| 270 | 270 |
| 271 void validateStateStack(); | 271 void validateStateStack(); |
| 272 | 272 |
| 273 enum DrawType { | 273 enum DrawType { |
| 274 ClipFill, // Fill that is already known to cover the current clip | 274 ClipFill, // Fill that is already known to cover the current clip |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 307 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
| 308 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 308 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
| 309 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 309 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); | 312 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); |
| 313 | 313 |
| 314 } // namespace blink | 314 } // namespace blink |
| 315 | 315 |
| 316 #endif // CanvasRenderingContext2D_h | 316 #endif // CanvasRenderingContext2D_h |
| OLD | NEW |