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

Side by Side Diff: sky/engine/core/html/HTMLCanvasElement.h

Issue 683703003: Remove various Heap* types. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/frame/Screen.cpp ('k') | sky/engine/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class IntSize; 58 class IntSize;
59 59
60 class CanvasObserver : public DummyBase<void> { 60 class CanvasObserver : public DummyBase<void> {
61 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CanvasObserver); 61 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CanvasObserver);
62 public: 62 public:
63 virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect) = 0; 63 virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect) = 0;
64 virtual void canvasResized(HTMLCanvasElement*) = 0; 64 virtual void canvasResized(HTMLCanvasElement*) = 0;
65 #if !ENABLE(OILPAN) 65 #if !ENABLE(OILPAN)
66 virtual void canvasDestroyed(HTMLCanvasElement*) = 0; 66 virtual void canvasDestroyed(HTMLCanvasElement*) = 0;
67 #endif 67 #endif
68
69 virtual void trace(Visitor*) { }
70 }; 68 };
71 69
72 class HTMLCanvasElement final : public HTMLElement, public DocumentVisibilityObs erver, public CanvasImageSource, public ImageBufferClient { 70 class HTMLCanvasElement final : public HTMLElement, public DocumentVisibilityObs erver, public CanvasImageSource, public ImageBufferClient {
73 DEFINE_WRAPPERTYPEINFO(); 71 DEFINE_WRAPPERTYPEINFO();
74 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLCanvasElement); 72 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLCanvasElement);
75 public: 73 public:
76 DECLARE_NODE_FACTORY(HTMLCanvasElement); 74 DECLARE_NODE_FACTORY(HTMLCanvasElement);
77 virtual ~HTMLCanvasElement(); 75 virtual ~HTMLCanvasElement();
78 76
79 void addObserver(CanvasObserver*); 77 void addObserver(CanvasObserver*);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 141
144 // CanvasImageSource implementation 142 // CanvasImageSource implementation
145 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma geStatus*) const override; 143 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma geStatus*) const override;
146 virtual FloatSize sourceSize() const override; 144 virtual FloatSize sourceSize() const override;
147 145
148 // ImageBufferClient implementation 146 // ImageBufferClient implementation
149 virtual void notifySurfaceInvalid() override; 147 virtual void notifySurfaceInvalid() override;
150 virtual bool isDirty() override { return !m_dirtyRect.isEmpty(); } 148 virtual bool isDirty() override { return !m_dirtyRect.isEmpty(); }
151 virtual void didFinalizeFrame() override; 149 virtual void didFinalizeFrame() override;
152 150
153 virtual void trace(Visitor*) override;
154
155 protected: 151 protected:
156 virtual void didMoveToNewDocument(Document& oldDocument) override; 152 virtual void didMoveToNewDocument(Document& oldDocument) override;
157 153
158 private: 154 private:
159 explicit HTMLCanvasElement(Document&); 155 explicit HTMLCanvasElement(Document&);
160 156
161 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 157 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
162 virtual RenderObject* createRenderer(RenderStyle*) override; 158 virtual RenderObject* createRenderer(RenderStyle*) override;
163 159
164 void finalizeFrameMicrotask(); 160 void finalizeFrameMicrotask();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 OwnPtr<ImageBuffer> m_imageBuffer; 196 OwnPtr<ImageBuffer> m_imageBuffer;
201 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; 197 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver;
202 198
203 mutable RefPtr<Image> m_presentedImage; 199 mutable RefPtr<Image> m_presentedImage;
204 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). 200 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue).
205 }; 201 };
206 202
207 } // namespace blink 203 } // namespace blink
208 204
209 #endif // HTMLCanvasElement_h 205 #endif // HTMLCanvasElement_h
OLDNEW
« no previous file with comments | « sky/engine/core/frame/Screen.cpp ('k') | sky/engine/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698