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

Unified Diff: third_party/WebKit/Source/core/paint/VideoPainterTest.cpp

Issue 2121933003: [SPv2] Paint accelerated canvases as foreign layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add 'override' keyword to StubChromeClientForSPv2::didPaint Created 4 years, 5 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
Index: third_party/WebKit/Source/core/paint/VideoPainterTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp b/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp
index 29551ff8336fad69de66dae96c3bcf9304df06d7..c8887508953a245373b8659f380c086e5f707fc7 100644
--- a/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp
+++ b/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp
@@ -8,10 +8,9 @@
#include "core/frame/Settings.h"
#include "core/html/HTMLMediaElement.h"
#include "core/loader/EmptyClients.h"
+#include "core/paint/StubChromeClientForSPv2.h"
#include "core/testing/DummyPageHolder.h"
-#include "platform/graphics/compositing/PaintArtifactCompositor.h"
#include "platform/testing/UnitTestHelpers.h"
-#include "platform/testing/WebLayerTreeViewImplForTesting.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCompositorSupport.h"
#include "public/platform/WebLayer.h"
@@ -24,27 +23,6 @@
namespace blink {
namespace {
-class StubChromeClient : public EmptyChromeClient {
-public:
- StubChromeClient(WebLayerTreeViewImplForTesting::LayerListPolicy layerListPolicy)
- : m_layerTreeView(layerListPolicy)
- {
- m_layerTreeView.setRootLayer(*m_paintArtifactCompositor.getWebLayer());
- }
-
- bool hasLayer(const WebLayer& layer) { return m_layerTreeView.hasLayer(layer); }
-
- // ChromeClient
- void didPaint(const PaintArtifact& artifact)
- {
- m_paintArtifactCompositor.update(artifact);
- }
-
-private:
- WebLayerTreeViewImplForTesting m_layerTreeView;
- PaintArtifactCompositor m_paintArtifactCompositor;
-};
-
class StubWebMediaPlayer : public WebMediaPlayer {
public:
StubWebMediaPlayer(WebMediaPlayerClient* client)
@@ -112,7 +90,7 @@ protected:
void SetUp() override
{
RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true);
- m_chromeClient = new StubChromeClient(GetParam());
+ m_chromeClient = new StubChromeClientForSPv2(GetParam());
m_frameLoaderClient = new StubFrameLoaderClient;
Page::PageClients clients;
fillWithEmptyClients(clients);
@@ -134,7 +112,7 @@ protected:
private:
RuntimeEnabledFeatures::Backup m_featuresBackup;
- Persistent<StubChromeClient> m_chromeClient;
+ Persistent<StubChromeClientForSPv2> m_chromeClient;
Persistent<StubFrameLoaderClient> m_frameLoaderClient;
std::unique_ptr<DummyPageHolder> m_pageHolder;
};

Powered by Google App Engine
This is Rietveld 408576698