Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp |
index 426de6922b1a097bfe0074b571b42e2441929682..5def30a97f54fb3b002564e90a19c6013f0bfb0e 100644 |
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp |
@@ -29,7 +29,9 @@ protected: |
void SetUp() override |
{ |
RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); |
- m_paintArtifactCompositor.initializeIfNeeded(); |
+ |
+ // Delay constructing the compositor until after the feature is set. |
+ m_paintArtifactCompositor = adoptPtr(new PaintArtifactCompositor); |
} |
void TearDown() override |
@@ -37,13 +39,13 @@ protected: |
m_featuresBackup.restore(); |
} |
- PaintArtifactCompositor& paintArtifactCompositor() { return m_paintArtifactCompositor; } |
- cc::Layer* rootLayer() { return m_paintArtifactCompositor.rootLayer(); } |
- void update(const PaintArtifact& artifact) { m_paintArtifactCompositor.update(artifact); } |
+ PaintArtifactCompositor& paintArtifactCompositor() { return *m_paintArtifactCompositor; } |
+ cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } |
+ void update(const PaintArtifact& artifact) { m_paintArtifactCompositor->update(artifact); } |
private: |
RuntimeEnabledFeatures::Backup m_featuresBackup; |
- PaintArtifactCompositor m_paintArtifactCompositor; |
+ OwnPtr<PaintArtifactCompositor> m_paintArtifactCompositor; |
}; |
TEST_F(PaintArtifactCompositorTest, EmptyPaintArtifact) |