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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.h

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Watch out only Oilpan heap usages Created 4 years, 10 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 // ImageBitmapSource implementation 168 // ImageBitmapSource implementation
169 IntSize bitmapSourceSize() const override; 169 IntSize bitmapSourceSize() const override;
170 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override; 170 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override;
171 171
172 DECLARE_VIRTUAL_TRACE(); 172 DECLARE_VIRTUAL_TRACE();
173 173
174 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>) ; 174 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>) ;
175 175
176 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex tFactory>); 176 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex tFactory>);
177 void updateExternallyAllocatedMemory() const;
178 177
179 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS tyle); 178 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS tyle);
180 179
181 void notifyListenersCanvasChanged(); 180 void notifyListenersCanvasChanged();
182 181
183 protected: 182 protected:
184 void didMoveToNewDocument(Document& oldDocument) override; 183 void didMoveToNewDocument(Document& oldDocument) override;
185 184
186 private: 185 private:
187 explicit HTMLCanvasElement(Document&); 186 explicit HTMLCanvasElement(Document&);
(...skipping 23 matching lines...) Expand all
211 210
212 PersistentHeapHashSetWillBeHeapHashSet<WeakMember<CanvasDrawListener>> m_lis teners; 211 PersistentHeapHashSetWillBeHeapHashSet<WeakMember<CanvasDrawListener>> m_lis teners;
213 212
214 IntSize m_size; 213 IntSize m_size;
215 214
216 OwnPtrWillBeMember<CanvasRenderingContext> m_context; 215 OwnPtrWillBeMember<CanvasRenderingContext> m_context;
217 216
218 bool m_ignoreReset; 217 bool m_ignoreReset;
219 FloatRect m_dirtyRect; 218 FloatRect m_dirtyRect;
220 219
221 mutable intptr_t m_externallyAllocatedMemory;
222
223 bool m_originClean; 220 bool m_originClean;
224 221
225 // It prevents HTMLCanvasElement::buffer() from continuously re-attempting t o allocate an imageBuffer 222 // It prevents HTMLCanvasElement::buffer() from continuously re-attempting t o allocate an imageBuffer
226 // after the first attempt failed. 223 // after the first attempt failed.
227 mutable bool m_didFailToCreateImageBuffer; 224 mutable bool m_didFailToCreateImageBuffer;
228 bool m_imageBufferIsClear; 225 bool m_imageBufferIsClear;
229 OwnPtr<ImageBuffer> m_imageBuffer; 226 OwnPtr<ImageBuffer> m_imageBuffer;
230 227
231 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). 228 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue).
232 }; 229 };
233 230
234 } // namespace blink 231 } // namespace blink
235 232
236 #endif // HTMLCanvasElement_h 233 #endif // HTMLCanvasElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698