| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 int SourceWidth() override { return size_.Width(); } | 196 int SourceWidth() override { return size_.Width(); } |
| 197 int SourceHeight() override { return size_.Height(); } | 197 int SourceHeight() override { return size_.Height(); } |
| 198 | 198 |
| 199 // CanvasSurfaceLayerBridgeObserver implementation | 199 // CanvasSurfaceLayerBridgeObserver implementation |
| 200 void OnWebLayerReplaced() override; | 200 void OnWebLayerReplaced() override; |
| 201 | 201 |
| 202 // ImageBufferClient implementation | 202 // ImageBufferClient implementation |
| 203 void NotifySurfaceInvalid() override; | 203 void NotifySurfaceInvalid() override; |
| 204 void DidDisableAcceleration() override; | 204 void DidDisableAcceleration() override; |
| 205 void RestoreCanvasMatrixClipStack(PaintCanvas*) const override; | 205 void RestoreCanvasMatrixClipStack(PaintCanvas*) const override; |
| 206 void SetNeedsCompositingUpdate() override; |
| 206 | 207 |
| 207 // ImageBitmapSource implementation | 208 // ImageBitmapSource implementation |
| 208 IntSize BitmapSourceSize() const override; | 209 IntSize BitmapSourceSize() const override; |
| 209 ScriptPromise CreateImageBitmap(ScriptState*, | 210 ScriptPromise CreateImageBitmap(ScriptState*, |
| 210 EventTarget&, | 211 EventTarget&, |
| 211 Optional<IntRect> crop_rect, | 212 Optional<IntRect> crop_rect, |
| 212 const ImageBitmapOptions&, | 213 const ImageBitmapOptions&, |
| 213 ExceptionState&) override; | 214 ExceptionState&) override; |
| 214 | 215 |
| 215 // OffscreenCanvasPlaceholder implementation. | 216 // OffscreenCanvasPlaceholder implementation. |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 std::unique_ptr<CanvasSurfaceLayerBridge> surface_layer_bridge_; | 322 std::unique_ptr<CanvasSurfaceLayerBridge> surface_layer_bridge_; |
| 322 | 323 |
| 323 int num_frames_since_last_rendering_mode_switch_; | 324 int num_frames_since_last_rendering_mode_switch_; |
| 324 bool pending_rendering_mode_switch_; | 325 bool pending_rendering_mode_switch_; |
| 325 bool did_notify_listeners_for_current_frame_ = false; | 326 bool did_notify_listeners_for_current_frame_ = false; |
| 326 }; | 327 }; |
| 327 | 328 |
| 328 } // namespace blink | 329 } // namespace blink |
| 329 | 330 |
| 330 #endif // HTMLCanvasElement_h | 331 #endif // HTMLCanvasElement_h |
| OLD | NEW |