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

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

Issue 2193173002: Move ThreadableLoader to Oilpan heap (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-bridge-peer-in-worker-threadable-loader
Patch Set: rebase Created 4 years, 4 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) 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 22 matching lines...) Expand all
33 33
34 #include "bindings/core/v8/HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElement OrBlobOrImageDataOrImageBitmap.h" 34 #include "bindings/core/v8/HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElement OrBlobOrImageDataOrImageBitmap.h"
35 #include "bindings/core/v8/ScriptPromise.h" 35 #include "bindings/core/v8/ScriptPromise.h"
36 #include "bindings/core/v8/ScriptPromiseResolver.h" 36 #include "bindings/core/v8/ScriptPromiseResolver.h"
37 #include "bindings/core/v8/ScriptState.h" 37 #include "bindings/core/v8/ScriptState.h"
38 #include "core/fileapi/FileReaderLoader.h" 38 #include "core/fileapi/FileReaderLoader.h"
39 #include "core/fileapi/FileReaderLoaderClient.h" 39 #include "core/fileapi/FileReaderLoaderClient.h"
40 #include "core/imagebitmap/ImageBitmapOptions.h" 40 #include "core/imagebitmap/ImageBitmapOptions.h"
41 #include "platform/Supplementable.h" 41 #include "platform/Supplementable.h"
42 #include "platform/geometry/IntRect.h" 42 #include "platform/geometry/IntRect.h"
43 #include <memory>
43 44
44 class SkImage; 45 class SkImage;
45 46
46 namespace blink { 47 namespace blink {
47 48
48 class Blob; 49 class Blob;
49 class EventTarget; 50 class EventTarget;
50 class ExceptionState; 51 class ExceptionState;
51 class ExecutionContext; 52 class ExecutionContext;
52 class ImageBitmapSource; 53 class ImageBitmapSource;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void scheduleAsyncImageBitmapDecoding(DOMArrayBuffer*); 95 void scheduleAsyncImageBitmapDecoding(DOMArrayBuffer*);
95 void decodeImageOnDecoderThread(WebTaskRunner*, DOMArrayBuffer*, const S tring& premultiplyAlphaOption, const String& colorSpaceConversionOption); 96 void decodeImageOnDecoderThread(WebTaskRunner*, DOMArrayBuffer*, const S tring& premultiplyAlphaOption, const String& colorSpaceConversionOption);
96 void resolvePromiseOnOriginalThread(PassRefPtr<SkImage>); 97 void resolvePromiseOnOriginalThread(PassRefPtr<SkImage>);
97 98
98 // FileReaderLoaderClient 99 // FileReaderLoaderClient
99 void didStartLoading() override { } 100 void didStartLoading() override { }
100 void didReceiveData() override { } 101 void didReceiveData() override { }
101 void didFinishLoading() override; 102 void didFinishLoading() override;
102 void didFail(FileError::ErrorCode) override; 103 void didFail(FileError::ErrorCode) override;
103 104
104 FileReaderLoader m_loader; 105 std::unique_ptr<FileReaderLoader> m_loader;
105 Member<ImageBitmapFactories> m_factory; 106 Member<ImageBitmapFactories> m_factory;
106 Member<ScriptPromiseResolver> m_resolver; 107 Member<ScriptPromiseResolver> m_resolver;
107 Optional<IntRect> m_cropRect; 108 Optional<IntRect> m_cropRect;
108 ImageBitmapOptions m_options; 109 ImageBitmapOptions m_options;
109 }; 110 };
110 111
111 static ImageBitmapFactories& from(EventTarget&); 112 static ImageBitmapFactories& from(EventTarget&);
112 113
113 template<class GlobalObject> 114 template<class GlobalObject>
114 static ImageBitmapFactories& fromInternal(GlobalObject&); 115 static ImageBitmapFactories& fromInternal(GlobalObject&);
115 116
116 void addLoader(ImageBitmapLoader*); 117 void addLoader(ImageBitmapLoader*);
117 void didFinishLoading(ImageBitmapLoader*); 118 void didFinishLoading(ImageBitmapLoader*);
118 119
119 HeapHashSet<Member<ImageBitmapLoader>> m_pendingLoaders; 120 HeapHashSet<Member<ImageBitmapLoader>> m_pendingLoaders;
120 }; 121 };
121 122
122 } // namespace blink 123 } // namespace blink
123 124
124 #endif // ImageBitmapFactories_h 125 #endif // ImageBitmapFactories_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698