| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // Lost context occurred due to internal implementation reasons. | 152 // Lost context occurred due to internal implementation reasons. |
| 153 SyntheticLostContext, | 153 SyntheticLostContext, |
| 154 }; | 154 }; |
| 155 virtual void loseContext(LostContextMode) {} | 155 virtual void loseContext(LostContextMode) {} |
| 156 | 156 |
| 157 // This method gets called at the end of script tasks that modified | 157 // This method gets called at the end of script tasks that modified |
| 158 // the contents of the canvas (called didDraw). It marks the completion | 158 // the contents of the canvas (called didDraw). It marks the completion |
| 159 // of a presentable frame. | 159 // of a presentable frame. |
| 160 virtual void finalizeFrame() {} | 160 virtual void finalizeFrame() {} |
| 161 | 161 |
| 162 void needsFinalizeFrame(); |
| 163 |
| 162 // WebThread::TaskObserver implementation | 164 // WebThread::TaskObserver implementation |
| 163 void didProcessTask() override; | 165 void didProcessTask() override; |
| 164 void willProcessTask() final {} | 166 void willProcessTask() final {} |
| 165 | 167 |
| 166 // Canvas2D-specific interface | 168 // Canvas2D-specific interface |
| 167 virtual bool is2d() const { return false; } | 169 virtual bool is2d() const { return false; } |
| 168 virtual void restoreCanvasMatrixClipStack(PaintCanvas*) const {} | 170 virtual void restoreCanvasMatrixClipStack(PaintCanvas*) const {} |
| 169 virtual void reset() {} | 171 virtual void reset() {} |
| 170 virtual void clearRect(double x, double y, double width, double height) {} | 172 virtual void clearRect(double x, double y, double width, double height) {} |
| 171 virtual void didSetSurfaceSize() {} | 173 virtual void didSetSurfaceSize() {} |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 CanvasColorSpace m_colorSpace; | 233 CanvasColorSpace m_colorSpace; |
| 232 CanvasPixelFormat m_pixelFormat; | 234 CanvasPixelFormat m_pixelFormat; |
| 233 bool m_linearPixelMath = false; | 235 bool m_linearPixelMath = false; |
| 234 CanvasContextCreationAttributes m_creationAttributes; | 236 CanvasContextCreationAttributes m_creationAttributes; |
| 235 bool m_finalizeFrameScheduled = false; | 237 bool m_finalizeFrameScheduled = false; |
| 236 }; | 238 }; |
| 237 | 239 |
| 238 } // namespace blink | 240 } // namespace blink |
| 239 | 241 |
| 240 #endif | 242 #endif |
| OLD | NEW |