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

Unified Diff: third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h

Issue 2322073006: Turn off the old compositing path for SPv2. (Closed)
Patch Set: none Created 4 years, 3 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/PaintControllerPaintTest.h
diff --git a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h
index 48b0f5e885e6c9fde8a133132c4a368e7cf4bbcd..5b67f555531e954adc302dc5d6be943b267bd968 100644
--- a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h
+++ b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h
@@ -11,6 +11,7 @@
#include "core/paint/PaintLayer.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayer.h"
+#include "platform/graphics/paint/CullRect.h"
#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include <gtest/gtest.h>
@@ -24,7 +25,12 @@ public:
protected:
LayoutView& layoutView() { return *document().layoutView(); }
- PaintController& rootPaintController() { return layoutView().layer()->graphicsLayerBacking()->getPaintController(); }
+ PaintController& rootPaintController()
+ {
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ return *document().view()->paintController();
+ return layoutView().layer()->graphicsLayerBacking()->getPaintController();
+ }
void SetUp() override
{
@@ -34,8 +40,17 @@ protected:
bool paintWithoutCommit(const IntRect* interestRect = nullptr)
{
- // Only root graphics layer is supported.
document().view()->lifecycle().advanceTo(DocumentLifecycle::InPaint);
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ if (layoutView().layer()->needsRepaint()) {
+ GraphicsContext graphicsContext(rootPaintController());
+ document().view()->paint(graphicsContext, CullRect(LayoutRect::infiniteIntRect()));
+ return true;
+ }
+ document().view()->lifecycle().advanceTo(DocumentLifecycle::PaintClean);
+ return false;
+ }
+ // Only root graphics layer is supported.
if (!layoutView().layer()->graphicsLayerBacking()->paintWithoutCommit(interestRect)) {
document().view()->lifecycle().advanceTo(DocumentLifecycle::PaintClean);
return false;

Powered by Google App Engine
This is Rietveld 408576698