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

Side by Side Diff: Source/core/imagebitmap/ImageBitmapFactories.h

Issue 949103002: InlinedVisitor: Migrate imagebitmap to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/imagebitmap/ImageBitmapFactories.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) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, HTMLCanva sElement*, int sx, int sy, int sw, int sh, ExceptionState&); 68 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, HTMLCanva sElement*, int sx, int sy, int sw, int sh, ExceptionState&);
69 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, Blob*, Ex ceptionState&); 69 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, Blob*, Ex ceptionState&);
70 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, Blob*, in t sx, int sy, int sw, int sh, ExceptionState&); 70 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, Blob*, in t sx, int sy, int sw, int sh, ExceptionState&);
71 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageData *, ExceptionState&); 71 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageData *, ExceptionState&);
72 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageData *, int sx, int sy, int sw, int sh, ExceptionState&); 72 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageData *, int sx, int sy, int sw, int sh, ExceptionState&);
73 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageBitm ap*, ExceptionState&); 73 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageBitm ap*, ExceptionState&);
74 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageBitm ap*, int sx, int sy, int sw, int sh, ExceptionState&); 74 static ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageBitm ap*, int sx, int sy, int sw, int sh, ExceptionState&);
75 75
76 virtual ~ImageBitmapFactories() { } 76 virtual ~ImageBitmapFactories() { }
77 77
78 void trace(Visitor*); 78 DECLARE_TRACE();
79 79
80 protected: 80 protected:
81 static const char* supplementName(); 81 static const char* supplementName();
82 82
83 private: 83 private:
84 class ImageBitmapLoader final : public GarbageCollectedFinalized<ImageBitmap Loader>, public FileReaderLoaderClient { 84 class ImageBitmapLoader final : public GarbageCollectedFinalized<ImageBitmap Loader>, public FileReaderLoaderClient {
85 public: 85 public:
86 static ImageBitmapLoader* create(ImageBitmapFactories& factory, const In tRect& cropRect, ScriptState* scriptState) 86 static ImageBitmapLoader* create(ImageBitmapFactories& factory, const In tRect& cropRect, ScriptState* scriptState)
87 { 87 {
88 return new ImageBitmapLoader(factory, cropRect, scriptState); 88 return new ImageBitmapLoader(factory, cropRect, scriptState);
89 } 89 }
90 90
91 void loadBlobAsync(ExecutionContext*, Blob*); 91 void loadBlobAsync(ExecutionContext*, Blob*);
92 ScriptPromise promise() { return m_resolver->promise(); } 92 ScriptPromise promise() { return m_resolver->promise(); }
93 93
94 void trace(Visitor*); 94 DECLARE_TRACE();
95 95
96 virtual ~ImageBitmapLoader() { } 96 virtual ~ImageBitmapLoader() { }
97 97
98 private: 98 private:
99 ImageBitmapLoader(ImageBitmapFactories&, const IntRect&, ScriptState*); 99 ImageBitmapLoader(ImageBitmapFactories&, const IntRect&, ScriptState*);
100 100
101 void rejectPromise(); 101 void rejectPromise();
102 102
103 // FileReaderLoaderClient 103 // FileReaderLoaderClient
104 virtual void didStartLoading() override { } 104 virtual void didStartLoading() override { }
(...skipping 14 matching lines...) Expand all
119 119
120 void addLoader(ImageBitmapLoader*); 120 void addLoader(ImageBitmapLoader*);
121 void didFinishLoading(ImageBitmapLoader*); 121 void didFinishLoading(ImageBitmapLoader*);
122 122
123 PersistentHeapHashSetWillBeHeapHashSet<Member<ImageBitmapLoader> > m_pending Loaders; 123 PersistentHeapHashSetWillBeHeapHashSet<Member<ImageBitmapLoader> > m_pending Loaders;
124 }; 124 };
125 125
126 } // namespace blink 126 } // namespace blink
127 127
128 #endif // ImageBitmapFactories_h 128 #endif // ImageBitmapFactories_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/imagebitmap/ImageBitmapFactories.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698