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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 { NOTREACHED(); return false; } | |
|
Justin Novosad
2016/08/19 16:49:39
could you make this pure virtual instead of using
xlai (Olivia)
2016/08/19 17:11:33
Done.
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |