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

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

Issue 2255683005: Determine if OffscreenCanvas is paintable in different rendering contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Canvas2DTypecast
Patch Set: enum Created 4 years, 4 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual bool shouldAntialias() const { return false; } 74 virtual bool shouldAntialias() const { return false; }
75 virtual bool hasAlpha() const { return true; } 75 virtual bool hasAlpha() const { return true; }
76 virtual void setIsHidden(bool) = 0; 76 virtual void setIsHidden(bool) = 0;
77 virtual bool isContextLost() const { return true; } 77 virtual bool isContextLost() const { return true; }
78 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); }; 78 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); };
79 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { NOTREACHED(); } 79 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { NOTREACHED(); }
80 80
81 // Return true if the content is updated. 81 // Return true if the content is updated.
82 virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) { return fal se; } 82 virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) { return fal se; }
83 83
84 // Note: this function is strictly for OffscreenCanvas only.
85 virtual bool isPaintable() const = 0;
86
84 virtual WebLayer* platformLayer() const { return nullptr; } 87 virtual WebLayer* platformLayer() const { return nullptr; }
85 88
86 enum LostContextMode { 89 enum LostContextMode {
87 NotLostContext, 90 NotLostContext,
88 91
89 // Lost context occurred at the graphics system level. 92 // Lost context occurred at the graphics system level.
90 RealLostContext, 93 RealLostContext,
91 94
92 // Lost context provoked by WEBGL_lose_context. 95 // Lost context provoked by WEBGL_lose_context.
93 WebGLLoseContextLostContext, 96 WebGLLoseContextLostContext,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 146
144 Member<HTMLCanvasElement> m_canvas; 147 Member<HTMLCanvasElement> m_canvas;
145 Member<OffscreenCanvas> m_offscreenCanvas; 148 Member<OffscreenCanvas> m_offscreenCanvas;
146 HashSet<String> m_cleanURLs; 149 HashSet<String> m_cleanURLs;
147 HashSet<String> m_dirtyURLs; 150 HashSet<String> m_dirtyURLs;
148 }; 151 };
149 152
150 } // namespace blink 153 } // namespace blink
151 154
152 #endif 155 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698