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

Unified Diff: src/core/SkLinearBitmapPipeline.h

Issue 2484273002: Move the matrix stage of SkLinearBitmapPipeline over to using SkSmallAllocator. (Closed)
Patch Set: rebase on new SkSmallAllocator Created 4 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 | src/core/SkLinearBitmapPipeline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLinearBitmapPipeline.h
diff --git a/src/core/SkLinearBitmapPipeline.h b/src/core/SkLinearBitmapPipeline.h
index 776f8d86039ca65e9d1629bcc03d1d69da025f69..ed621a9454f5665157c9727c68999f98f622c56e 100644
--- a/src/core/SkLinearBitmapPipeline.h
+++ b/src/core/SkLinearBitmapPipeline.h
@@ -12,6 +12,7 @@
#include "SkImageInfo.h"
#include "SkMatrix.h"
#include "SkShader.h"
+#include "SkSmallAllocator.h"
class SkEmbeddableLinearPipeline;
@@ -125,15 +126,23 @@ public:
class PixelAccessorInterface;
// These values were generated by the assert above in Stage::init{Sink|Stage}.
- using MatrixStage = Stage<PointProcessorInterface, 56, PointProcessorInterface>;
using TileStage = Stage<PointProcessorInterface, 48, SampleProcessorInterface>;
using SampleStage = Stage<SampleProcessorInterface, 160, BlendProcessorInterface>;
using BlenderStage = Stage<BlendProcessorInterface, 48>;
using Accessor = PolyMemory<PixelAccessorInterface, 64>;
private:
+ PointProcessorInterface* ChooseMatrix(
+ PointProcessorInterface* next,
+ const SkMatrix& inverse);
+
+ using MemoryAllocator = SkSmallAllocator<64, 1>;
+ using MatrixCloner =
+ std::function<PointProcessorInterface* (PointProcessorInterface*, MemoryAllocator*)>;
+
+ MemoryAllocator fMemory;
PointProcessorInterface* fFirstStage;
- MatrixStage fMatrixStage;
+ MatrixCloner fMatrixStageCloner;
TileStage fTileStage;
SampleStage fSampleStage;
BlenderStage fBlenderStage;
« no previous file with comments | « no previous file | src/core/SkLinearBitmapPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698