OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkScanPriv.h" | 8 #include "SkScanPriv.h" |
9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
10 #include "SkEdge.h" | 10 #include "SkEdge.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 fPrevX = fFirstX; | 325 fPrevX = fFirstX; |
326 } else { | 326 } else { |
327 int invWidth = fLastX - fPrevX; | 327 int invWidth = fLastX - fPrevX; |
328 if (invWidth > 0) { | 328 if (invWidth > 0) { |
329 fBlitter->blitH(fPrevX, y, invWidth); | 329 fBlitter->blitH(fPrevX, y, invWidth); |
330 } | 330 } |
331 } | 331 } |
332 } | 332 } |
333 | 333 |
334 // overrides | 334 // overrides |
335 virtual void blitH(int x, int y, int width) { | 335 virtual void blitH(int x, int y, int width) SK_OVERRIDE { |
336 int invWidth = x - fPrevX; | 336 int invWidth = x - fPrevX; |
337 if (invWidth > 0) { | 337 if (invWidth > 0) { |
338 fBlitter->blitH(fPrevX, y, invWidth); | 338 fBlitter->blitH(fPrevX, y, invWidth); |
339 } | 339 } |
340 fPrevX = x + width; | 340 fPrevX = x + width; |
341 } | 341 } |
342 | 342 |
343 // we do not expect to get called with these entrypoints | 343 // we do not expect to get called with these entrypoints |
344 virtual void blitAntiH(int, int, const SkAlpha[], const int16_t runs[]) { | 344 virtual void blitAntiH(int, int, const SkAlpha[], const int16_t runs[]) SK_O
VERRIDE { |
345 SkDEBUGFAIL("blitAntiH unexpected"); | 345 SkDEBUGFAIL("blitAntiH unexpected"); |
346 } | 346 } |
347 virtual void blitV(int x, int y, int height, SkAlpha alpha) { | 347 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { |
348 SkDEBUGFAIL("blitV unexpected"); | 348 SkDEBUGFAIL("blitV unexpected"); |
349 } | 349 } |
350 virtual void blitRect(int x, int y, int width, int height) { | 350 virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE { |
351 SkDEBUGFAIL("blitRect unexpected"); | 351 SkDEBUGFAIL("blitRect unexpected"); |
352 } | 352 } |
353 virtual void blitMask(const SkMask&, const SkIRect& clip) { | 353 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE { |
354 SkDEBUGFAIL("blitMask unexpected"); | 354 SkDEBUGFAIL("blitMask unexpected"); |
355 } | 355 } |
356 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) { | 356 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE { |
357 SkDEBUGFAIL("justAnOpaqueColor unexpected"); | 357 SkDEBUGFAIL("justAnOpaqueColor unexpected"); |
358 return NULL; | 358 return NULL; |
359 } | 359 } |
360 | 360 |
361 private: | 361 private: |
362 SkBlitter* fBlitter; | 362 SkBlitter* fBlitter; |
363 int fFirstX, fLastX, fPrevX; | 363 int fFirstX, fLastX, fPrevX; |
364 }; | 364 }; |
365 | 365 |
366 static void PrePostInverseBlitterProc(SkBlitter* blitter, int y, bool isStart) { | 366 static void PrePostInverseBlitterProc(SkBlitter* blitter, int y, bool isStart) { |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 clipRgn = &wrap.getRgn(); | 724 clipRgn = &wrap.getRgn(); |
725 blitter = wrap.getBlitter(); | 725 blitter = wrap.getBlitter(); |
726 } | 726 } |
727 | 727 |
728 SkScanClipper clipper(blitter, clipRgn, ir); | 728 SkScanClipper clipper(blitter, clipRgn, ir); |
729 blitter = clipper.getBlitter(); | 729 blitter = clipper.getBlitter(); |
730 if (blitter) { | 730 if (blitter) { |
731 sk_fill_triangle(pts, clipper.getClipRect(), blitter, ir); | 731 sk_fill_triangle(pts, clipper.getClipRect(), blitter, ir); |
732 } | 732 } |
733 } | 733 } |
OLD | NEW |