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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 // Canvas2D-specific interface | 102 // Canvas2D-specific interface |
103 virtual bool is2d() const { return false; } | 103 virtual bool is2d() const { return false; } |
104 virtual void restoreCanvasMatrixClipStack(SkCanvas*) const { } | 104 virtual void restoreCanvasMatrixClipStack(SkCanvas*) const { } |
105 virtual void reset() { } | 105 virtual void reset() { } |
106 virtual void clearRect(double x, double y, double width, double height) { } | 106 virtual void clearRect(double x, double y, double width, double height) { } |
107 virtual void didSetSurfaceSize() { } | 107 virtual void didSetSurfaceSize() { } |
108 virtual void setShouldAntialias(bool) { } | 108 virtual void setShouldAntialias(bool) { } |
109 virtual unsigned hitRegionsCount() const { return 0; } | 109 virtual unsigned hitRegionsCount() const { return 0; } |
110 virtual void setFont(const String&) { } | 110 virtual void setFont(const String&) { } |
111 virtual void styleDidChange(const ComputedStyle* oldStyle, const ComputedSty le& newStyle) { } | 111 virtual void styleDidChange(const ComputedStyle* oldStyle, const ComputedSty le& newStyle) { } |
112 virtual std::pair<Element*, String> getControlAndIDIfHitRegionExists(const L ayoutPoint& location) { return std::make_pair(nullptr, String()); } | |
Justin Novosad
2016/02/05 15:22:53
I think this default implementation (and the all t
zino
2016/02/12 15:26:19
Done.
| |
112 | 113 |
113 // WebGL-specific interface | 114 // WebGL-specific interface |
114 virtual bool is3d() const { return false; } | 115 virtual bool is3d() const { return false; } |
115 virtual void setFilterQuality(SkFilterQuality) { ASSERT_NOT_REACHED(); } | 116 virtual void setFilterQuality(SkFilterQuality) { ASSERT_NOT_REACHED(); } |
116 virtual void reshape(int width, int height) { ASSERT_NOT_REACHED(); } | 117 virtual void reshape(int width, int height) { ASSERT_NOT_REACHED(); } |
117 virtual void markLayerComposited() { ASSERT_NOT_REACHED(); } | 118 virtual void markLayerComposited() { ASSERT_NOT_REACHED(); } |
118 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) { A SSERT_NOT_REACHED(); return nullptr; } | 119 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) { A SSERT_NOT_REACHED(); return nullptr; } |
119 virtual int externallyAllocatedBytesPerPixel() { ASSERT_NOT_REACHED(); retur n 0; } | 120 virtual int externallyAllocatedBytesPerPixel() { ASSERT_NOT_REACHED(); retur n 0; } |
120 | 121 |
121 bool wouldTaintOrigin(CanvasImageSource*); | 122 bool wouldTaintOrigin(CanvasImageSource*); |
122 void didMoveToNewDocument(Document*); | 123 void didMoveToNewDocument(Document*); |
123 | 124 |
124 protected: | 125 protected: |
125 CanvasRenderingContext(HTMLCanvasElement*); | 126 CanvasRenderingContext(HTMLCanvasElement*); |
126 DECLARE_VIRTUAL_TRACE(); | 127 DECLARE_VIRTUAL_TRACE(); |
127 | 128 |
128 // ActiveDOMObject notifications | 129 // ActiveDOMObject notifications |
129 bool hasPendingActivity() const final; | 130 bool hasPendingActivity() const final; |
130 void stop() override = 0; | 131 void stop() override = 0; |
131 | 132 |
132 private: | 133 private: |
133 RawPtrWillBeMember<HTMLCanvasElement> m_canvas; | 134 RawPtrWillBeMember<HTMLCanvasElement> m_canvas; |
134 HashSet<String> m_cleanURLs; | 135 HashSet<String> m_cleanURLs; |
135 HashSet<String> m_dirtyURLs; | 136 HashSet<String> m_dirtyURLs; |
136 }; | 137 }; |
137 | 138 |
138 } // namespace blink | 139 } // namespace blink |
139 | 140 |
140 #endif | 141 #endif |
OLD | NEW |