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

Side by Side Diff: src/core/SkAAClip.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/core/SkAAClip.h ('k') | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkAAClip.h" 9 #include "SkAAClip.h"
10 #include "SkBlitter.h" 10 #include "SkBlitter.h"
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 } 1266 }
1267 } 1267 }
1268 1268
1269 /** 1269 /**
1270 Must evaluate clips in scan-line order, so don't want to allow blitV(), 1270 Must evaluate clips in scan-line order, so don't want to allow blitV(),
1271 but an AAClip can be clipped down to a single pixel wide, so we 1271 but an AAClip can be clipped down to a single pixel wide, so we
1272 must support it (given AntiRect semantics: minimum width is 2). 1272 must support it (given AntiRect semantics: minimum width is 2).
1273 Instead we'll rely on the runtime asserts to guarantee Y monotonicity; 1273 Instead we'll rely on the runtime asserts to guarantee Y monotonicity;
1274 any failure cases that misses may have minor artifacts. 1274 any failure cases that misses may have minor artifacts.
1275 */ 1275 */
1276 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { 1276 void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE {
1277 this->recordMinY(y); 1277 this->recordMinY(y);
1278 fBuilder->addColumn(x, y, alpha, height); 1278 fBuilder->addColumn(x, y, alpha, height);
1279 fLastY = y + height - 1; 1279 fLastY = y + height - 1;
1280 } 1280 }
1281 1281
1282 virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE { 1282 void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
1283 this->recordMinY(y); 1283 this->recordMinY(y);
1284 this->checkForYGap(y); 1284 this->checkForYGap(y);
1285 fBuilder->addRectRun(x, y, width, height); 1285 fBuilder->addRectRun(x, y, width, height);
1286 fLastY = y + height - 1; 1286 fLastY = y + height - 1;
1287 } 1287 }
1288 1288
1289 virtual void blitAntiRect(int x, int y, int width, int height, 1289 virtual void blitAntiRect(int x, int y, int width, int height,
1290 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE { 1290 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE {
1291 this->recordMinY(y); 1291 this->recordMinY(y);
1292 this->checkForYGap(y); 1292 this->checkForYGap(y);
1293 fBuilder->addAntiRectRun(x, y, width, height, leftAlpha, rightAlpha); 1293 fBuilder->addAntiRectRun(x, y, width, height, leftAlpha, rightAlpha);
1294 fLastY = y + height - 1; 1294 fLastY = y + height - 1;
1295 } 1295 }
1296 1296
1297 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE 1297 void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE
1298 { unexpected(); } 1298 { unexpected(); }
1299 1299
1300 virtual const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE { 1300 const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE {
1301 return NULL; 1301 return NULL;
1302 } 1302 }
1303 1303
1304 virtual void blitH(int x, int y, int width) SK_OVERRIDE { 1304 void blitH(int x, int y, int width) SK_OVERRIDE {
1305 this->recordMinY(y); 1305 this->recordMinY(y);
1306 this->checkForYGap(y); 1306 this->checkForYGap(y);
1307 fBuilder->addRun(x, y, 0xFF, width); 1307 fBuilder->addRun(x, y, 0xFF, width);
1308 } 1308 }
1309 1309
1310 virtual void blitAntiH(int x, int y, const SkAlpha alpha[], 1310 virtual void blitAntiH(int x, int y, const SkAlpha alpha[],
1311 const int16_t runs[]) SK_OVERRIDE { 1311 const int16_t runs[]) SK_OVERRIDE {
1312 this->recordMinY(y); 1312 this->recordMinY(y);
1313 this->checkForYGap(y); 1313 this->checkForYGap(y);
1314 for (;;) { 1314 for (;;) {
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 rowMask.fBounds.fBottom = y + 1; 2215 rowMask.fBounds.fBottom = y + 1;
2216 fBlitter->blitMask(rowMask, rowMask.fBounds); 2216 fBlitter->blitMask(rowMask, rowMask.fBounds);
2217 src = (const void*)((const char*)src + srcRB); 2217 src = (const void*)((const char*)src + srcRB);
2218 } while (++y < localStopY); 2218 } while (++y < localStopY);
2219 } while (y < stopY); 2219 } while (y < stopY);
2220 } 2220 }
2221 2221
2222 const SkBitmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) { 2222 const SkBitmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) {
2223 return NULL; 2223 return NULL;
2224 } 2224 }
OLDNEW
« no previous file with comments | « src/core/SkAAClip.h ('k') | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698