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

Unified Diff: src/core/SkLinearBitmapPipeline.cpp

Issue 1852613002: First blitter for linear pipeline. (Closed) Base URL: https://skia.googlesource.com/skia.git@clone-the-pipeline
Patch Set: remove test Created 4 years, 8 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
« src/core/SkBitmapProcShader.cpp ('K') | « src/core/SkLinearBitmapPipeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLinearBitmapPipeline.cpp
diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp
index 539547af9a903288f63a772e9a7be08b9666a614..77e034c9da4f1025a9e6c3193e095e442015967d 100644
--- a/src/core/SkLinearBitmapPipeline.cpp
+++ b/src/core/SkLinearBitmapPipeline.cpp
@@ -776,8 +776,33 @@ SkLinearBitmapPipeline::SkLinearBitmapPipeline(
fLastStage = blenderStage;
}
+SkLinearBitmapPipeline::SkLinearBitmapPipeline(
+ const SkLinearBitmapPipeline& pipeline,
+ SkXfermode::Mode mode,
+ const SkPixmap& srcPixmap,
+ const SkImageInfo& dstInfo)
+{
+ SkASSERT(mode == SkXfermode::kSrc_Mode);
+ SkASSERT(srcPixmap.info().colorType() == dstInfo.colorType()
+ && srcPixmap.info().colorType() == kRGBA_8888_SkColorType);
+
+ fSampleStage.initSink<RGBA8888UnitRepeat>(srcPixmap.writable_addr32(0, 0), srcPixmap.width());
+ auto sampleStage = fSampleStage.get();
+ auto tilerStage = pipeline.fTileStage.cloneStageTo(sampleStage, &fTileStage);
+ tilerStage = (tilerStage != nullptr) ? tilerStage : sampleStage;
+ auto matrixStage = pipeline.fMatrixStage.cloneStageTo(tilerStage, &fMatrixStage);
+ matrixStage = (matrixStage != nullptr) ? matrixStage : tilerStage;
+ fFirstStage = matrixStage;
+ fLastStage = fSampleStage.getInterface<DestinationInterface, RGBA8888UnitRepeat>();
+}
mtklein 2016/04/11 16:43:25 It is weird that we've constructed an object here
herb_g 2016/04/12 20:03:49 I think that shadeSpan4f will go away as we restru
+
void SkLinearBitmapPipeline::shadeSpan4f(int x, int y, SkPM4f* dst, int count) {
SkASSERT(count > 0);
+ this->blitSpan(x, y, dst, count);
+}
+
+void SkLinearBitmapPipeline::blitSpan(int x, int y, void* dst, int count) {
+ SkASSERT(count > 0);
fLastStage->setDestination(dst, count);
// The count and length arguments start out in a precise relation in order to keep the
« src/core/SkBitmapProcShader.cpp ('K') | « src/core/SkLinearBitmapPipeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698