Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Issue 2699713005: Fix missing finalizeFrame barriers in WebGL animations (Closed)
Patch Set: Comments + readability improvements Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 RealLostContext, 127 RealLostContext,
128 128
129 // Lost context provoked by WEBGL_lose_context. 129 // Lost context provoked by WEBGL_lose_context.
130 WebGLLoseContextLostContext, 130 WebGLLoseContextLostContext,
131 131
132 // Lost context occurred due to internal implementation reasons. 132 // Lost context occurred due to internal implementation reasons.
133 SyntheticLostContext, 133 SyntheticLostContext,
134 }; 134 };
135 virtual void loseContext(LostContextMode) {} 135 virtual void loseContext(LostContextMode) {}
136 136
137 // This method gets called at the end of script tasks that modified
138 // the contents of the canvas (called didDraw). It marks the completion
139 // of a presentable frame.
140 virtual void finalizeFrame() {}
141
137 // WebThread::TaskObserver implementation 142 // WebThread::TaskObserver implementation
138 void didProcessTask() override; 143 void didProcessTask() override;
139 void willProcessTask() final {} 144 void willProcessTask() final {}
140 145
141 // Canvas2D-specific interface 146 // Canvas2D-specific interface
142 virtual bool is2d() const { return false; } 147 virtual bool is2d() const { return false; }
143 virtual void restoreCanvasMatrixClipStack(PaintCanvas*) const {} 148 virtual void restoreCanvasMatrixClipStack(PaintCanvas*) const {}
144 virtual void reset() {} 149 virtual void reset() {}
145 virtual void clearRect(double x, double y, double width, double height) {} 150 virtual void clearRect(double x, double y, double width, double height) {}
146 virtual void didSetSurfaceSize() {} 151 virtual void didSetSurfaceSize() {}
147 virtual void setShouldAntialias(bool) {} 152 virtual void setShouldAntialias(bool) {}
148 virtual unsigned hitRegionsCount() const { return 0; } 153 virtual unsigned hitRegionsCount() const { return 0; }
149 virtual void setFont(const String&) {} 154 virtual void setFont(const String&) {}
150 virtual void styleDidChange(const ComputedStyle* oldStyle, 155 virtual void styleDidChange(const ComputedStyle* oldStyle,
151 const ComputedStyle& newStyle) {} 156 const ComputedStyle& newStyle) {}
152 virtual HitTestCanvasResult* getControlAndIdIfHitRegionExists( 157 virtual HitTestCanvasResult* getControlAndIdIfHitRegionExists(
153 const LayoutPoint& location) { 158 const LayoutPoint& location) {
154 NOTREACHED(); 159 NOTREACHED();
155 return HitTestCanvasResult::create(String(), nullptr); 160 return HitTestCanvasResult::create(String(), nullptr);
156 } 161 }
157 virtual String getIdFromControl(const Element* element) { return String(); } 162 virtual String getIdFromControl(const Element* element) { return String(); }
158 virtual bool isAccelerationOptimalForCanvasContent() const { return true; } 163 virtual bool isAccelerationOptimalForCanvasContent() const { return true; }
159 virtual void resetUsageTracking(){}; 164 virtual void resetUsageTracking(){};
160 virtual void incrementFrameCount(){};
161 165
162 // WebGL-specific interface 166 // WebGL-specific interface
163 virtual bool is3d() const { return false; } 167 virtual bool is3d() const { return false; }
164 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); } 168 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); }
165 virtual void reshape(int width, int height) { NOTREACHED(); } 169 virtual void reshape(int width, int height) { NOTREACHED(); }
166 virtual void markLayerComposited() { NOTREACHED(); } 170 virtual void markLayerComposited() { NOTREACHED(); }
167 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) { 171 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) {
168 NOTREACHED(); 172 NOTREACHED();
169 return nullptr; 173 return nullptr;
170 } 174 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 HashSet<String> m_cleanURLs; 209 HashSet<String> m_cleanURLs;
206 HashSet<String> m_dirtyURLs; 210 HashSet<String> m_dirtyURLs;
207 CanvasColorSpace m_colorSpace; 211 CanvasColorSpace m_colorSpace;
208 CanvasContextCreationAttributes m_creationAttributes; 212 CanvasContextCreationAttributes m_creationAttributes;
209 bool m_finalizeFrameScheduled = false; 213 bool m_finalizeFrameScheduled = false;
210 }; 214 };
211 215
212 } // namespace blink 216 } // namespace blink
213 217
214 #endif 218 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698