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

Unified Diff: Source/platform/graphics/GraphicsContextTest.cpp

Issue 1168983002: Fix graphics context test to pass in slimming paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Bail out of RecordingCanvas test as it doesn't make sense in SP. Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContextTest.cpp
diff --git a/Source/platform/graphics/GraphicsContextTest.cpp b/Source/platform/graphics/GraphicsContextTest.cpp
index b161d098239defe09ca05af842ef259f517698a3..414fce61ad5643acedcf835a339de138402b40bb 100644
--- a/Source/platform/graphics/GraphicsContextTest.cpp
+++ b/Source/platform/graphics/GraphicsContextTest.cpp
@@ -26,6 +26,7 @@
#include "platform/graphics/GraphicsContext.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/BitmapImage.h"
#include "platform/graphics/ImageBuffer.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -209,6 +210,11 @@ TEST(GraphicsContextTest, UnboundedDrawsAreClipped)
TEST(GraphicsContextTest, RecordingTotalMatrix)
{
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ // GraphicsContext::getCTM() won't do the right thing in Slimming Paint, so just skip this test.
+ return;
+ }
+
SkBitmap bitmap;
bitmap.allocN32Pixels(400, 400);
bitmap.eraseColor(0);
@@ -243,6 +249,12 @@ TEST(GraphicsContextTest, RecordingTotalMatrix)
TEST(GraphicsContextTest, RecordingCanvas)
{
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ // This test doesn't make any sense in slimming paint as you can't begin recording within an existing recording,
+ // so just bail out.
+ return;
+ }
+
SkBitmap bitmap;
bitmap.allocN32Pixels(1, 1);
bitmap.eraseColor(0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698