Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 201666666 The Chromium Authors. All rights reserved. | |
|
Justin Novosad
2016/03/02 15:41:50
You fell asleep on the keyboard? Stop working so h
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/html/canvas/OffscreenCanvasRenderingContext.h" | |
| 6 | |
| 7 namespace blink { | |
| 8 | |
| 9 OffscreenCanvasRenderingContext::OffscreenCanvasRenderingContext(OffscreenCanvas * canvas) | |
| 10 : m_offscreenCanvas(canvas) | |
| 11 , m_contextType(ContextTypeCount) | |
| 12 { | |
| 13 } | |
| 14 | |
| 15 OffscreenCanvasRenderingContext::ContextType OffscreenCanvasRenderingContext::co ntextTypeFromId(const String& id) | |
| 16 { | |
| 17 if (id == "2d") | |
| 18 return Context2d; | |
| 19 if (id == "webgl") | |
| 20 return ContextWebgl; | |
| 21 if (id == "webgl2") | |
| 22 return ContextWebgl2; | |
| 23 if (id == "imagebitmap") | |
| 24 return ContextImageBitmap; | |
| 25 return ContextTypeCount; | |
| 26 } | |
| 27 | |
| 28 DEFINE_TRACE(OffscreenCanvasRenderingContext) | |
| 29 { | |
| 30 visitor->trace(m_offscreenCanvas); | |
| 31 } | |
| 32 | |
| 33 } // namespace blink | |
| OLD | NEW |