| Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
|
| diff --git a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5b3234c6150bb0b7f84e43a54fbbc6ad37891a83
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "modules/offscreencanvas/OffscreenCanvasRenderingContext.h"
|
| +
|
| +namespace blink {
|
| +
|
| +OffscreenCanvasRenderingContext::OffscreenCanvasRenderingContext(OffscreenCanvas* canvas)
|
| + : m_offscreenCanvas(canvas)
|
| +{
|
| +}
|
| +
|
| +OffscreenCanvasRenderingContext::ContextType OffscreenCanvasRenderingContext::contextTypeFromId(const String& id)
|
| +{
|
| + if (id == "2d")
|
| + return Context2d;
|
| + if (id == "webgl")
|
| + return ContextWebgl;
|
| + if (id == "webgl2")
|
| + return ContextWebgl2;
|
| + return ContextTypeCount;
|
| +}
|
| +
|
| +DEFINE_TRACE(OffscreenCanvasRenderingContext)
|
| +{
|
| + visitor->trace(m_offscreenCanvas);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|