Disable optimizations GM for 565 targets.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Jan 2014 16:45:38 +0000 (16:45 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Jan 2014 16:45:38 +0000 (16:45 +0000)
BUG=skia:1994
R=robertphillips@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/129373002

git-svn-id: http://skia.googlecode.com/svn/trunk@12991 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/optimizations.cpp

index 6b7d2843fc688d78fd03855eade2c4276e0ba28f..8d0b7caa84b500423cc8354cfc13494136787b31 100644 (file)
@@ -311,6 +311,14 @@ public:
     static const int kHeight = 800;
 
 protected:
+    uint32_t onGetFlags() const SK_OVERRIDE {
+        // One optimization changes the color drawn slightly in a 565 target.
+        // We've decided it's innocuous, so we disable this GM when targeting 565.
+        // Revisit this if we get finer-grained control: it'd be nice to keep drawing directly.
+        // For more, see skia:1994.
+        return skiagm::GM::kSkip565_Flag;
+    }
+
     SkString onShortName() {
         return SkString("optimizations");
     }