| 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CanvasRenderingContext_h | 26 #ifndef CanvasRenderingContext_h |
| 27 #define CanvasRenderingContext_h | 27 #define CanvasRenderingContext_h |
| 28 | 28 |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "core/html/HTMLCanvasElement.h" | 30 #include "core/html/HTMLCanvasElement.h" |
| 31 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 31 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 32 #include "core/layout/HitTestCanvasResult.h" | 32 #include "core/layout/HitTestCanvasResult.h" |
| 33 #include "core/offscreencanvas/OffscreenCanvas.h" | 33 #include "core/offscreencanvas/OffscreenCanvas.h" |
| 34 #include "skia/ext/cdl_common.h" |
| 34 #include "third_party/skia/include/core/SkColorSpace.h" | 35 #include "third_party/skia/include/core/SkColorSpace.h" |
| 35 #include "third_party/skia/include/core/SkImageInfo.h" | 36 #include "third_party/skia/include/core/SkImageInfo.h" |
| 36 #include "wtf/HashSet.h" | 37 #include "wtf/HashSet.h" |
| 37 #include "wtf/Noncopyable.h" | 38 #include "wtf/Noncopyable.h" |
| 38 #include "wtf/text/StringHash.h" | 39 #include "wtf/text/StringHash.h" |
| 39 | 40 |
| 40 class SkCanvas; | |
| 41 | |
| 42 namespace blink { | 41 namespace blink { |
| 43 | 42 |
| 44 class CanvasImageSource; | 43 class CanvasImageSource; |
| 45 class HTMLCanvasElement; | 44 class HTMLCanvasElement; |
| 46 class ImageData; | 45 class ImageData; |
| 47 class ImageBitmap; | 46 class ImageBitmap; |
| 48 class WebLayer; | 47 class WebLayer; |
| 49 | 48 |
| 50 enum CanvasColorSpace { | 49 enum CanvasColorSpace { |
| 51 kLegacyCanvasColorSpace, | 50 kLegacyCanvasColorSpace, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Lost context provoked by WEBGL_lose_context. | 119 // Lost context provoked by WEBGL_lose_context. |
| 121 WebGLLoseContextLostContext, | 120 WebGLLoseContextLostContext, |
| 122 | 121 |
| 123 // Lost context occurred due to internal implementation reasons. | 122 // Lost context occurred due to internal implementation reasons. |
| 124 SyntheticLostContext, | 123 SyntheticLostContext, |
| 125 }; | 124 }; |
| 126 virtual void loseContext(LostContextMode) {} | 125 virtual void loseContext(LostContextMode) {} |
| 127 | 126 |
| 128 // Canvas2D-specific interface | 127 // Canvas2D-specific interface |
| 129 virtual bool is2d() const { return false; } | 128 virtual bool is2d() const { return false; } |
| 130 virtual void restoreCanvasMatrixClipStack(SkCanvas*) const {} | 129 virtual void restoreCanvasMatrixClipStack(CdlCanvas*) const {} |
| 131 virtual void reset() {} | 130 virtual void reset() {} |
| 132 virtual void clearRect(double x, double y, double width, double height) {} | 131 virtual void clearRect(double x, double y, double width, double height) {} |
| 133 virtual void didSetSurfaceSize() {} | 132 virtual void didSetSurfaceSize() {} |
| 134 virtual void setShouldAntialias(bool) {} | 133 virtual void setShouldAntialias(bool) {} |
| 135 virtual unsigned hitRegionsCount() const { return 0; } | 134 virtual unsigned hitRegionsCount() const { return 0; } |
| 136 virtual void setFont(const String&) {} | 135 virtual void setFont(const String&) {} |
| 137 virtual void styleDidChange(const ComputedStyle* oldStyle, | 136 virtual void styleDidChange(const ComputedStyle* oldStyle, |
| 138 const ComputedStyle& newStyle) {} | 137 const ComputedStyle& newStyle) {} |
| 139 virtual HitTestCanvasResult* getControlAndIdIfHitRegionExists( | 138 virtual HitTestCanvasResult* getControlAndIdIfHitRegionExists( |
| 140 const LayoutPoint& location) { | 139 const LayoutPoint& location) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 Member<OffscreenCanvas> m_offscreenCanvas; | 189 Member<OffscreenCanvas> m_offscreenCanvas; |
| 191 HashSet<String> m_cleanURLs; | 190 HashSet<String> m_cleanURLs; |
| 192 HashSet<String> m_dirtyURLs; | 191 HashSet<String> m_dirtyURLs; |
| 193 CanvasColorSpace m_colorSpace; | 192 CanvasColorSpace m_colorSpace; |
| 194 CanvasContextCreationAttributes m_creationAttributes; | 193 CanvasContextCreationAttributes m_creationAttributes; |
| 195 }; | 194 }; |
| 196 | 195 |
| 197 } // namespace blink | 196 } // namespace blink |
| 198 | 197 |
| 199 #endif | 198 #endif |
| OLD | NEW |