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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 /* 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class ExceptionState; 56 class ExceptionState;
57 class FloatRect; 57 class FloatRect;
58 class GraphicsContext; 58 class GraphicsContext;
59 class HTMLCanvasElement; 59 class HTMLCanvasElement;
60 class HTMLImageElement; 60 class HTMLImageElement;
61 class HTMLVideoElement; 61 class HTMLVideoElement;
62 class ImageBitmap; 62 class ImageBitmap;
63 class ImageData; 63 class ImageData;
64 class TextMetrics; 64 class TextMetrics;
65 65
66 typedef WillBePersistentHeapHashMap<String, RefPtrWillBeMember<MutableStylePrope rtySet> > MutableStylePropertyMap; 66 typedef WillBeHeapHashMap<String, RefPtrWillBeMember<MutableStylePropertySet> > MutableStylePropertyMap;
67 67
68 class CanvasRenderingContext2D FINAL: public ScriptWrappable, public CanvasRende ringContext, public CanvasPathMethods { 68 class CanvasRenderingContext2D FINAL: public CanvasRenderingContext, public Scri ptWrappable, public CanvasPathMethods {
69 public: 69 public:
70 static PassOwnPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas , const Canvas2DContextAttributes* attrs, bool usesCSSCompatibilityParseMode) 70 static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2D> create(HTMLCanvasEle ment* canvas, const Canvas2DContextAttributes* attrs, bool usesCSSCompatibilityP arseMode)
71 { 71 {
72 return adoptPtr(new CanvasRenderingContext2D(canvas, attrs, usesCSSCompa tibilityParseMode)); 72 return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs, us esCSSCompatibilityParseMode));
73 } 73 }
74 virtual ~CanvasRenderingContext2D(); 74 virtual ~CanvasRenderingContext2D();
75 75
76 CanvasStyle* strokeStyle() const; 76 CanvasStyle* strokeStyle() const;
77 void setStrokeStyle(PassRefPtr<CanvasStyle>); 77 void setStrokeStyle(PassRefPtr<CanvasStyle>);
78 78
79 CanvasStyle* fillStyle() const; 79 CanvasStyle* fillStyle() const;
80 void setFillStyle(PassRefPtr<CanvasStyle>); 80 void setFillStyle(PassRefPtr<CanvasStyle>);
81 81
82 float lineWidth() const; 82 float lineWidth() const;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 void setImageSmoothingEnabled(bool); 228 void setImageSmoothingEnabled(bool);
229 229
230 PassRefPtr<Canvas2DContextAttributes> getContextAttributes() const; 230 PassRefPtr<Canvas2DContextAttributes> getContextAttributes() const;
231 231
232 void drawFocusIfNeeded(Element*); 232 void drawFocusIfNeeded(Element*);
233 bool drawCustomFocusRing(Element*); 233 bool drawCustomFocusRing(Element*);
234 234
235 void loseContext(); 235 void loseContext();
236 void restoreContext(); 236 void restoreContext();
237 237
238 virtual void trace(Visitor*) OVERRIDE;
239
238 private: 240 private:
239 class State FINAL : public CSSFontSelectorClient { 241 class State FINAL : public CSSFontSelectorClient {
240 public: 242 public:
241 State(); 243 State();
242 virtual ~State(); 244 virtual ~State();
243 245
244 State(const State&); 246 State(const State&);
245 State& operator=(const State&); 247 State& operator=(const State&);
246 248
247 // CSSFontSelectorClient implementation 249 // CSSFontSelectorClient implementation
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 virtual bool is2d() const OVERRIDE { return true; } 340 virtual bool is2d() const OVERRIDE { return true; }
339 virtual bool isAccelerated() const OVERRIDE; 341 virtual bool isAccelerated() const OVERRIDE;
340 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } 342 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; }
341 343
342 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver tibleCTM; } 344 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver tibleCTM; }
343 345
344 virtual blink::WebLayer* platformLayer() const OVERRIDE; 346 virtual blink::WebLayer* platformLayer() const OVERRIDE;
345 347
346 // FIXME: Oilpan: Make this a vector of embedded State objects rather than p ointers 348 // FIXME: Oilpan: Make this a vector of embedded State objects rather than p ointers
347 // once we support having vectors with objects using a vtable in oilpan. 349 // once we support having vectors with objects using a vtable in oilpan.
348 WillBePersistentHeapVector<OwnPtrWillBeMember<State> > m_stateStack; 350 WillBeHeapVector<OwnPtrWillBeMember<State> > m_stateStack;
349 bool m_usesCSSCompatibilityParseMode; 351 bool m_usesCSSCompatibilityParseMode;
350 bool m_hasAlpha; 352 bool m_hasAlpha;
351 bool m_isContextLost; 353 bool m_isContextLost;
352 bool m_contextRestorable; 354 bool m_contextRestorable;
353 Canvas2DContextStorage m_storageMode; 355 Canvas2DContextStorage m_storageMode;
354 MutableStylePropertyMap m_fetchedFonts; 356 MutableStylePropertyMap m_fetchedFonts;
355 unsigned m_tryRestoreContextAttemptCount; 357 unsigned m_tryRestoreContextAttemptCount;
356 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; 358 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer;
357 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; 359 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer;
358 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; 360 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer;
359 }; 361 };
360 362
361 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 363 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
362 364
363 } // namespace WebCore 365 } // namespace WebCore
364 366
365 #endif 367 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698