delete some dead code in SampleApp
Change-Id: Ie01859eafbde292fe7f5228512c4134acf6d452b
Reviewed-on: https://skia-review.googlesource.com/18265
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
index 959ac50..f4d2324 100644
--- a/samplecode/ClockFaceView.cpp
+++ b/samplecode/ClockFaceView.cpp
@@ -19,46 +19,6 @@
#include "SkStrokeRec.h"
#include "SkTypeface.h"
-static inline SkPMColor rgb2gray(SkPMColor c) {
- unsigned r = SkGetPackedR32(c);
- unsigned g = SkGetPackedG32(c);
- unsigned b = SkGetPackedB32(c);
-
- unsigned x = (r * 5 + g * 7 + b * 4) >> 4;
-
- return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT));
-}
-
-class SkGrayScaleColorFilter : public SkColorFilter {
-public:
- virtual void filterSpan(const SkPMColor src[], int count,
- SkPMColor result[]) const override {
- for (int i = 0; i < count; i++) {
- result[i] = rgb2gray(src[i]);
- }
- }
-};
-
-class SkChannelMaskColorFilter : public SkColorFilter {
-public:
- SkChannelMaskColorFilter(U8CPU redMask, U8CPU greenMask, U8CPU blueMask) {
- fMask = SkPackARGB32(0xFF, redMask, greenMask, blueMask);
- }
-
- virtual void filterSpan(const SkPMColor src[], int count,
- SkPMColor result[]) const override {
- SkPMColor mask = fMask;
- for (int i = 0; i < count; i++) {
- result[i] = src[i] & mask;
- }
- }
-
-private:
- SkPMColor fMask;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-
#include "SkGradientShader.h"
#include "SkLayerRasterizer.h"
#include "SkBlurMaskFilter.h"
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index ecd6715..f7a5a3a 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -36,45 +36,6 @@
#include <math.h>
#include "DecodeFile.h"
-static inline SkPMColor rgb2gray(SkPMColor c) {
- unsigned r = SkGetPackedR32(c);
- unsigned g = SkGetPackedG32(c);
- unsigned b = SkGetPackedB32(c);
-
- unsigned x = (r * 5 + g * 7 + b * 4) >> 4;
-
- return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT));
-}
-
-class SkGrayScaleColorFilter : public SkColorFilter {
-public:
- virtual void filterSpan(const SkPMColor src[], int count,
- SkPMColor result[]) const override {
- for (int i = 0; i < count; i++)
- result[i] = rgb2gray(src[i]);
- }
-};
-
-class SkChannelMaskColorFilter : public SkColorFilter {
-public:
- SkChannelMaskColorFilter(U8CPU redMask, U8CPU greenMask, U8CPU blueMask) {
- fMask = SkPackARGB32(0xFF, redMask, greenMask, blueMask);
- }
-
- virtual void filterSpan(const SkPMColor src[], int count,
- SkPMColor result[]) const override {
- SkPMColor mask = fMask;
- for (int i = 0; i < count; i++) {
- result[i] = src[i] & mask;
- }
- }
-
-private:
- SkPMColor fMask;
-};
-
-///////////////////////////////////////////////////////////
-
static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) {
p.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(3)),