| Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeAndroid.cpp b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
|
| similarity index 27%
|
| copy from third_party/WebKit/Source/core/layout/LayoutThemeAndroid.cpp
|
| copy to third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
|
| index 59f5aa7b471615c91ea40714fe40292819ce04f9..5b3234c6150bb0b7f84e43a54fbbc6ad37891a83 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutThemeAndroid.cpp
|
| +++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
|
| @@ -2,23 +2,29 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "core/layout/LayoutThemeAndroid.h"
|
| +#include "modules/offscreencanvas/OffscreenCanvasRenderingContext.h"
|
|
|
| namespace blink {
|
|
|
| -PassRefPtr<LayoutTheme> LayoutThemeAndroid::create()
|
| +OffscreenCanvasRenderingContext::OffscreenCanvasRenderingContext(OffscreenCanvas* canvas)
|
| + : m_offscreenCanvas(canvas)
|
| {
|
| - return adoptRef(new LayoutThemeAndroid());
|
| }
|
|
|
| -LayoutTheme& LayoutTheme::nativeTheme()
|
| +OffscreenCanvasRenderingContext::ContextType OffscreenCanvasRenderingContext::contextTypeFromId(const String& id)
|
| {
|
| - DEFINE_STATIC_REF(LayoutTheme, layoutTheme, (LayoutThemeAndroid::create()));
|
| - return *layoutTheme;
|
| + if (id == "2d")
|
| + return Context2d;
|
| + if (id == "webgl")
|
| + return ContextWebgl;
|
| + if (id == "webgl2")
|
| + return ContextWebgl2;
|
| + return ContextTypeCount;
|
| }
|
|
|
| -LayoutThemeAndroid::~LayoutThemeAndroid()
|
| +DEFINE_TRACE(OffscreenCanvasRenderingContext)
|
| {
|
| + visitor->trace(m_offscreenCanvas);
|
| }
|
|
|
| } // namespace blink
|
|
|