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

Unified Diff: src/core/SkBlitter_A8.cpp

Issue 66923002: remove bogus assert, and remove outdated #ifdef (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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: src/core/SkBlitter_A8.cpp
diff --git a/src/core/SkBlitter_A8.cpp b/src/core/SkBlitter_A8.cpp
index c5c184e310fd41578f3cbe1a6eb74f05bd0a36f1..983a226e3460a755bee4f80a287f3eb1b788eb41 100644
--- a/src/core/SkBlitter_A8.cpp
+++ b/src/core/SkBlitter_A8.cpp
@@ -350,8 +350,6 @@ void SkA8_Shader_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) {
///////////////////////////////////////////////////////////////////////////////
-#define SK_A8_COVERAGE_BLIT_SKIP_ZEROS
-
SkA8_Coverage_Blitter::SkA8_Coverage_Blitter(const SkBitmap& device,
const SkPaint& paint) : SkRasterBlitter(device) {
SkASSERT(NULL == paint.getShader());
@@ -361,8 +359,6 @@ SkA8_Coverage_Blitter::SkA8_Coverage_Blitter(const SkBitmap& device,
void SkA8_Coverage_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
const int16_t runs[]) {
- SkASSERT(0 == x);
-
uint8_t* device = fDevice.getAddr8(x, y);
SkDEBUGCODE(int totalCount = 0;)
@@ -372,10 +368,7 @@ void SkA8_Coverage_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
if (count == 0) {
return;
}
-#ifdef SK_A8_COVERAGE_BLIT_SKIP_ZEROS
- if (antialias[0])
-#endif
- {
+ if (antialias[0]) {
memset(device, antialias[0], count);
}
runs += count;
@@ -392,11 +385,10 @@ void SkA8_Coverage_Blitter::blitH(int x, int y, int width) {
}
void SkA8_Coverage_Blitter::blitV(int x, int y, int height, SkAlpha alpha) {
-#ifdef SK_A8_COVERAGE_BLIT_SKIP_ZEROS
if (0 == alpha) {
return;
}
-#endif
+
uint8_t* dst = fDevice.getAddr8(x, y);
const size_t dstRB = fDevice.rowBytes();
while (--height >= 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