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

Unified Diff: src/effects/SkStippleMaskFilter.cpp

Issue 462013002: remove SkStippleMaskFilter - no external clients (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « include/effects/SkStippleMaskFilter.h ('k') | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkStippleMaskFilter.cpp
diff --git a/src/effects/SkStippleMaskFilter.cpp b/src/effects/SkStippleMaskFilter.cpp
deleted file mode 100644
index 4aceb110662d96513d03a9252059333d7c0bbfd7..0000000000000000000000000000000000000000
--- a/src/effects/SkStippleMaskFilter.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkStippleMaskFilter.h"
-#include "SkString.h"
-
-bool SkStippleMaskFilter::filterMask(SkMask* dst,
- const SkMask& src,
- const SkMatrix& matrix,
- SkIPoint* margin) const {
-
- if (src.fFormat != SkMask::kA8_Format) {
- return false;
- }
-
- dst->fBounds = src.fBounds;
- dst->fRowBytes = dst->fBounds.width();
- dst->fFormat = SkMask::kA8_Format;
- dst->fImage = NULL;
-
- if (NULL != src.fImage) {
- size_t dstSize = dst->computeImageSize();
- if (0 == dstSize) {
- return false; // too big to allocate, abort
- }
-
- dst->fImage = SkMask::AllocImage(dstSize);
-
- uint8_t* srcScanLine = src.fImage;
- uint8_t* scanline = dst->fImage;
-
- for (int y = 0; y < src.fBounds.height(); ++y) {
- for (int x = 0; x < src.fBounds.width(); ++x) {
- scanline[x] = srcScanLine[x] && ((x+y) & 0x1) ? 0xFF : 0x00;
- }
- scanline += dst->fRowBytes;
- srcScanLine += src.fRowBytes;
- }
- }
-
- return true;
-}
-
-#ifndef SK_IGNORE_TO_STRING
-void SkStippleMaskFilter::toString(SkString* str) const {
- str->append("SkStippleMaskFilter: ()");
-}
-#endif
« no previous file with comments | « include/effects/SkStippleMaskFilter.h ('k') | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698