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

Unified Diff: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp

Issue 1999143002: Add CanvasSurfaceLayerBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edit based on danakj's feedback Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b13d9ad7c36c2260ff386af7f2fdae63c4b4564e
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
@@ -0,0 +1,27 @@
+// 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 "platform/graphics/CanvasSurfaceLayerBridge.h"
+
+#include "cc/layers/solid_color_layer.h"
+#include "platform/graphics/GraphicsLayer.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebCompositorSupport.h"
+#include "public/platform/WebLayer.h"
+
+namespace blink {
+
+CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge()
+{
+ m_solidColorLayer = cc::SolidColorLayer::Create();
+ m_solidColorLayer->SetBackgroundColor(SK_ColorBLUE);
+ m_webLayer = adoptPtr(Platform::current()->compositorSupport()->createLayerFromCCLayer(m_solidColorLayer.get()));
+ GraphicsLayer::registerContentsLayer(m_webLayer.get());
+}
+
+CanvasSurfaceLayerBridge::~CanvasSurfaceLayerBridge()
+{
+}
+
+}
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698