Chromium Code Reviews| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 // WebGL-specific interface | 120 // WebGL-specific interface |
| 121 virtual bool is3d() const { return false; } | 121 virtual bool is3d() const { return false; } |
| 122 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); } | 122 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); } |
| 123 virtual void reshape(int width, int height) { NOTREACHED(); } | 123 virtual void reshape(int width, int height) { NOTREACHED(); } |
| 124 virtual void markLayerComposited() { NOTREACHED(); } | 124 virtual void markLayerComposited() { NOTREACHED(); } |
| 125 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) { N OTREACHED(); return nullptr; } | 125 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) { N OTREACHED(); return nullptr; } |
| 126 virtual int externallyAllocatedBytesPerPixel() { NOTREACHED(); return 0; } | 126 virtual int externallyAllocatedBytesPerPixel() { NOTREACHED(); return 0; } |
| 127 | 127 |
| 128 // ImageBitmap-specific interface | 128 // ImageBitmap-specific interface |
| 129 virtual bool paint(GraphicsContext&, const IntRect&) { return false; } | 129 virtual bool paint(GraphicsContext&, const IntRect&) { return false; } |
| 130 virtual Image* getImage() const { return nullptr; } | |
|
Justin Novosad
2016/08/22 19:42:25
Image is a ref counted type. You should not be ret
zakerinasab
2016/08/22 19:55:50
Done.
| |
| 130 | 131 |
| 131 bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr); | 132 bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr); |
| 132 void didMoveToNewDocument(Document*); | 133 void didMoveToNewDocument(Document*); |
| 133 | 134 |
| 134 // OffscreenCanvas-specific methods | 135 // OffscreenCanvas-specific methods |
| 135 OffscreenCanvas* getOffscreenCanvas() const { return m_offscreenCanvas; } | 136 OffscreenCanvas* getOffscreenCanvas() const { return m_offscreenCanvas; } |
| 136 virtual ImageBitmap* transferToImageBitmap(ExceptionState&) { return nullptr ; } | 137 virtual ImageBitmap* transferToImageBitmap(ExceptionState&) { return nullptr ; } |
| 137 | 138 |
| 138 void detachCanvas() { m_canvas = nullptr; } | 139 void detachCanvas() { m_canvas = nullptr; } |
| 139 | 140 |
| 140 protected: | 141 protected: |
| 141 CanvasRenderingContext(HTMLCanvasElement* = nullptr, OffscreenCanvas* = null ptr); | 142 CanvasRenderingContext(HTMLCanvasElement* = nullptr, OffscreenCanvas* = null ptr); |
| 142 DECLARE_VIRTUAL_TRACE(); | 143 DECLARE_VIRTUAL_TRACE(); |
| 143 virtual void stop() = 0; | 144 virtual void stop() = 0; |
| 144 | 145 |
| 145 private: | 146 private: |
| 146 void dispose(); | 147 void dispose(); |
| 147 | 148 |
| 148 Member<HTMLCanvasElement> m_canvas; | 149 Member<HTMLCanvasElement> m_canvas; |
| 149 Member<OffscreenCanvas> m_offscreenCanvas; | 150 Member<OffscreenCanvas> m_offscreenCanvas; |
| 150 HashSet<String> m_cleanURLs; | 151 HashSet<String> m_cleanURLs; |
| 151 HashSet<String> m_dirtyURLs; | 152 HashSet<String> m_dirtyURLs; |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 } // namespace blink | 155 } // namespace blink |
| 155 | 156 |
| 156 #endif | 157 #endif |
| OLD | NEW |