OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
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 "SkLinearBitmapPipeline.h" | 8 #include "SkLinearBitmapPipeline.h" |
9 | 9 |
10 #include "SkPM4f.h" | 10 #include "SkPM4f.h" |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 | 582 |
583 void SkLinearBitmapPipeline::shadeSpan4f(int x, int y, SkPM4f* dst, int count) { | 583 void SkLinearBitmapPipeline::shadeSpan4f(int x, int y, SkPM4f* dst, int count) { |
584 SkASSERT(count > 0); | 584 SkASSERT(count > 0); |
585 fPixelStage->setDestination(dst); | 585 fPixelStage->setDestination(dst); |
586 // The count and length arguments start out in a precise relation in order t
o keep the | 586 // The count and length arguments start out in a precise relation in order t
o keep the |
587 // math correct through the different stages. Count is the number of pixel t
o produce. | 587 // math correct through the different stages. Count is the number of pixel t
o produce. |
588 // Since the code samples at pixel centers, length is the distance from the
center of the | 588 // Since the code samples at pixel centers, length is the distance from the
center of the |
589 // first pixel to the center of the last pixel. This implies that length is
count-1. | 589 // first pixel to the center of the last pixel. This implies that length is
count-1. |
590 fFirstStage->pointSpan(Span{{x + 0.5f, y + 0.5f}, count - 1.0f, count}); | 590 fFirstStage->pointSpan(Span{{x + 0.5f, y + 0.5f}, count - 1.0f, count}); |
591 } | 591 } |
592 | |
OLD | NEW |