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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 return 0; | 201 return 0; |
202 } | 202 } |
203 | 203 |
204 // ImageBitmap-specific interface | 204 // ImageBitmap-specific interface |
205 virtual bool Paint(GraphicsContext&, const IntRect&) { return false; } | 205 virtual bool Paint(GraphicsContext&, const IntRect&) { return false; } |
206 | 206 |
207 // OffscreenCanvas-specific methods | 207 // OffscreenCanvas-specific methods |
208 OffscreenCanvas* offscreenCanvas() const { return offscreen_canvas_; } | 208 OffscreenCanvas* offscreenCanvas() const { return offscreen_canvas_; } |
209 virtual ImageBitmap* TransferToImageBitmap(ScriptState*) { return nullptr; } | 209 virtual ImageBitmap* TransferToImageBitmap(ScriptState*) { return nullptr; } |
210 | 210 |
211 bool WouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr); | 211 bool WouldTaintOrigin(CanvasImageSource*, SecurityOrigin*); |
212 void DidMoveToNewDocument(Document*); | 212 void DidMoveToNewDocument(Document*); |
213 | 213 |
214 void DetachCanvas() { canvas_ = nullptr; } | 214 void DetachCanvas() { canvas_ = nullptr; } |
215 void DetachOffscreenCanvas() { offscreen_canvas_ = nullptr; } | 215 void DetachOffscreenCanvas() { offscreen_canvas_ = nullptr; } |
216 | 216 |
217 const CanvasContextCreationAttributes& CreationAttributes() const { | 217 const CanvasContextCreationAttributes& CreationAttributes() const { |
218 return creation_attributes_; | 218 return creation_attributes_; |
219 } | 219 } |
220 | 220 |
221 protected: | 221 protected: |
(...skipping 13 matching lines...) Expand all Loading... |
235 CanvasColorSpace color_space_; | 235 CanvasColorSpace color_space_; |
236 CanvasPixelFormat pixel_format_; | 236 CanvasPixelFormat pixel_format_; |
237 bool linear_pixel_math_ = false; | 237 bool linear_pixel_math_ = false; |
238 CanvasContextCreationAttributes creation_attributes_; | 238 CanvasContextCreationAttributes creation_attributes_; |
239 bool finalize_frame_scheduled_ = false; | 239 bool finalize_frame_scheduled_ = false; |
240 }; | 240 }; |
241 | 241 |
242 } // namespace blink | 242 } // namespace blink |
243 | 243 |
244 #endif | 244 #endif |
OLD | NEW |