| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 // PageVisibilityObserver implementation | 156 // PageVisibilityObserver implementation |
| 157 void pageVisibilityChanged() override; | 157 void pageVisibilityChanged() override; |
| 158 | 158 |
| 159 // CanvasImageSource implementation | 159 // CanvasImageSource implementation |
| 160 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason, const FloatSize&) const override; | 160 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason, const FloatSize&) const override; |
| 161 bool wouldTaintOrigin(SecurityOrigin*) const override; | 161 bool wouldTaintOrigin(SecurityOrigin*) const override; |
| 162 FloatSize elementSize(const FloatSize&) const override; | 162 FloatSize elementSize(const FloatSize&) const override; |
| 163 bool isCanvasElement() const override { return true; } | 163 bool isCanvasElement() const override { return true; } |
| 164 bool isOpaque() const override; | 164 bool isOpaque() const override; |
| 165 bool isAccelerated() const override; |
| 165 int sourceWidth() override { return m_size.width(); } | 166 int sourceWidth() override { return m_size.width(); } |
| 166 int sourceHeight() override { return m_size.height(); } | 167 int sourceHeight() override { return m_size.height(); } |
| 167 | 168 |
| 168 // ImageBufferClient implementation | 169 // ImageBufferClient implementation |
| 169 void notifySurfaceInvalid() override; | 170 void notifySurfaceInvalid() override; |
| 170 bool isDirty() override { return !m_dirtyRect.isEmpty(); } | 171 bool isDirty() override { return !m_dirtyRect.isEmpty(); } |
| 171 void didDisableAcceleration() override; | 172 void didDisableAcceleration() override; |
| 172 void didFinalizeFrame() override; | 173 void didFinalizeFrame() override; |
| 173 void restoreCanvasMatrixClipStack(SkCanvas*) const override; | 174 void restoreCanvasMatrixClipStack(SkCanvas*) const override; |
| 174 | 175 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // Used for OffscreenCanvas that controls this HTML canvas element | 261 // Used for OffscreenCanvas that controls this HTML canvas element |
| 261 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; | 262 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; |
| 262 | 263 |
| 263 int m_numFramesSinceLastRenderingModeSwitch; | 264 int m_numFramesSinceLastRenderingModeSwitch; |
| 264 bool m_pendingRenderingModeSwitch; | 265 bool m_pendingRenderingModeSwitch; |
| 265 }; | 266 }; |
| 266 | 267 |
| 267 } // namespace blink | 268 } // namespace blink |
| 268 | 269 |
| 269 #endif // HTMLCanvasElement_h | 270 #endif // HTMLCanvasElement_h |
| OLD | NEW |