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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 211073002: [Oilpan]: Move CSSFontSelectorClient to the oilpan heap using transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding StyleEngine.cpp change (forgot to upload diff again with WTF change) Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/CanvasRenderingContext2D.h
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
index 0428bdcac6fef5dd5ab1fca4e329b158c4a5ffc5..be492029d83b628856ff1327f8beda8326c32c1c 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
@@ -115,7 +115,7 @@ public:
String globalCompositeOperation() const;
void setGlobalCompositeOperation(const String&);
- void save() { ++m_stateStack.last().m_unrealizedSaveCount; }
+ void save() { ++m_stateStack.last()->m_unrealizedSaveCount; }
void restore();
PassRefPtr<SVGMatrixTearOff> currentTransform() const
@@ -234,7 +234,8 @@ public:
bool drawCustomFocusRing(Element*);
private:
- struct State FINAL : CSSFontSelectorClient {
+ class State FINAL : public CSSFontSelectorClient {
+ public:
State();
virtual ~State();
@@ -244,6 +245,8 @@ private:
// CSSFontSelectorClient implementation
virtual void fontsNeedUpdate(CSSFontSelector*) OVERRIDE;
+ virtual void trace(Visitor*) OVERRIDE { }
+
unsigned m_unrealizedSaveCount;
String m_unparsedStrokeColor;
@@ -277,8 +280,8 @@ private:
CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes* attrs, bool usesCSSCompatibilityParseMode);
- State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return m_stateStack.last(); }
- const State& state() const { return m_stateStack.last(); }
+ State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return *m_stateStack.last(); }
+ const State& state() const { return *m_stateStack.last(); }
void applyLineDash() const;
void setShadow(const FloatSize& offset, float blur, RGBA32 color);
@@ -332,7 +335,9 @@ private:
virtual blink::WebLayer* platformLayer() const OVERRIDE;
- Vector<State, 1> m_stateStack;
+ // FIXME: Oilpan: Make this a vector of embedded State objects rather than pointers
+ // once we support having vectors with objects using a vtable in oilpan.
+ WillBePersistentHeapVector<OwnPtrWillBeMember<State> > m_stateStack;
bool m_usesCSSCompatibilityParseMode;
bool m_hasAlpha;
MutableStylePropertyMap m_fetchedFonts;

Powered by Google App Engine
This is Rietveld 408576698