OLD | NEW |
---|---|
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 | 166 |
167 void prepareSurfaceForPaintingIfNeeded() const; | 167 void prepareSurfaceForPaintingIfNeeded() const; |
168 | 168 |
169 const AtomicString imageSourceURL() const override; | 169 const AtomicString imageSourceURL() const override; |
170 | 170 |
171 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 171 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
172 | 172 |
173 // ContextLifecycleObserver and PageVisibilityObserver implementation | 173 // ContextLifecycleObserver and PageVisibilityObserver implementation |
174 void contextDestroyed(ExecutionContext*) override; | 174 void contextDestroyed(ExecutionContext*) override; |
175 | 175 |
176 void finalizeFrame(); | |
177 | |
176 // PageVisibilityObserver implementation | 178 // PageVisibilityObserver implementation |
177 void pageVisibilityChanged() override; | 179 void pageVisibilityChanged() override; |
178 | 180 |
179 // CanvasImageSource implementation | 181 // CanvasImageSource implementation |
180 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, | 182 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, |
181 AccelerationHint, | 183 AccelerationHint, |
182 SnapshotReason, | 184 SnapshotReason, |
183 const FloatSize&) const override; | 185 const FloatSize&) const override; |
184 bool wouldTaintOrigin(SecurityOrigin*) const override; | 186 bool wouldTaintOrigin(SecurityOrigin*) const override; |
185 FloatSize elementSize(const FloatSize&) const override; | 187 FloatSize elementSize(const FloatSize&) const override; |
186 bool isCanvasElement() const override { return true; } | 188 bool isCanvasElement() const override { return true; } |
187 bool isOpaque() const override; | 189 bool isOpaque() const override; |
188 bool isAccelerated() const override; | 190 bool isAccelerated() const override; |
189 int sourceWidth() override { return m_size.width(); } | 191 int sourceWidth() override { return m_size.width(); } |
190 int sourceHeight() override { return m_size.height(); } | 192 int sourceHeight() override { return m_size.height(); } |
191 | 193 |
192 // CanvasSurfaceLayerBridgeObserver implementation | 194 // CanvasSurfaceLayerBridgeObserver implementation |
193 void OnWebLayerReplaced() override; | 195 void OnWebLayerReplaced() override; |
194 | 196 |
195 // ImageBufferClient implementation | 197 // ImageBufferClient implementation |
196 void notifySurfaceInvalid() override; | 198 void notifySurfaceInvalid() override; |
197 bool isDirty() override { return !m_dirtyRect.isEmpty(); } | 199 bool isDirty() { return !m_dirtyRect.isEmpty(); } |
xlai (Olivia)
2017/02/08 17:58:40
Since this function no longer override ImageBuffer
Justin Novosad
2017/02/08 18:43:11
Done.
| |
198 void didDisableAcceleration() override; | 200 void didDisableAcceleration() override; |
199 void didFinalizeFrame() override; | |
200 void restoreCanvasMatrixClipStack(PaintCanvas*) const override; | 201 void restoreCanvasMatrixClipStack(PaintCanvas*) const override; |
201 | 202 |
202 void doDeferredPaintInvalidation(); | 203 void doDeferredPaintInvalidation(); |
203 | 204 |
204 // ImageBitmapSource implementation | 205 // ImageBitmapSource implementation |
205 IntSize bitmapSourceSize() const override; | 206 IntSize bitmapSourceSize() const override; |
206 ScriptPromise createImageBitmap(ScriptState*, | 207 ScriptPromise createImageBitmap(ScriptState*, |
207 EventTarget&, | 208 EventTarget&, |
208 Optional<IntRect> cropRect, | 209 Optional<IntRect> cropRect, |
209 const ImageBitmapOptions&, | 210 const ImageBitmapOptions&, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 // Used for OffscreenCanvas that controls this HTML canvas element | 313 // Used for OffscreenCanvas that controls this HTML canvas element |
313 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; | 314 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; |
314 | 315 |
315 int m_numFramesSinceLastRenderingModeSwitch; | 316 int m_numFramesSinceLastRenderingModeSwitch; |
316 bool m_pendingRenderingModeSwitch; | 317 bool m_pendingRenderingModeSwitch; |
317 }; | 318 }; |
318 | 319 |
319 } // namespace blink | 320 } // namespace blink |
320 | 321 |
321 #endif // HTMLCanvasElement_h | 322 #endif // HTMLCanvasElement_h |
OLD | NEW |