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

Side by Side Diff: src/core/SkLinearBitmapPipeline.h

Issue 1996683003: Srcover for sprite blitters. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove srgb default. Created 4 years, 7 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
« src/core/SkBlitter_Sprite.cpp ('K') | « src/core/SkBlitter_Sprite.cpp ('k') | no next file » | 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 * 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 #ifndef SkLinearBitmapPipeline_DEFINED 8 #ifndef SkLinearBitmapPipeline_DEFINED
9 #define SkLinearBitmapPipeline_DEFINED 9 #define SkLinearBitmapPipeline_DEFINED
10 10
11 #include "SkColor.h" 11 #include "SkColor.h"
12 #include "SkImageInfo.h" 12 #include "SkImageInfo.h"
13 #include "SkMatrix.h" 13 #include "SkMatrix.h"
14 #include "SkShader.h" 14 #include "SkShader.h"
15 15
16 class SkEmbeddableLinearPipeline; 16 class SkEmbeddableLinearPipeline;
17 17
18 //////////////////////////////////////////////////////////////////////////////// /////////////////// 18 //////////////////////////////////////////////////////////////////////////////// ///////////////////
19 // SkLinearBitmapPipeline - encapsulates all the machinery for doing floating po int pixel 19 // SkLinearBitmapPipeline - encapsulates all the machinery for doing floating po int pixel
20 // processing in a linear color space. 20 // processing in a linear color space.
21 // Note: this class has unusual alignment requirements due to its use of SIMD in structions. The 21 // Note: this class has unusual alignment requirements due to its use of SIMD in structions. The
22 // class SkEmbeddableLinearPipeline below manages these requirements. 22 // class SkEmbeddableLinearPipeline below manages these requirements.
23 class SkLinearBitmapPipeline { 23 class SkLinearBitmapPipeline {
24 public: 24 public:
25 // Constructor to support producing an SkBlitter.
25 SkLinearBitmapPipeline( 26 SkLinearBitmapPipeline(
26 const SkMatrix& inverse, 27 const SkMatrix& inverse,
27 SkFilterQuality filterQuality, 28 SkFilterQuality filterQuality,
28 SkShader::TileMode xTile, SkShader::TileMode yTile, 29 SkShader::TileMode xTile, SkShader::TileMode yTile,
29 SkColor paintColor, 30 SkColor paintColor,
30 const SkPixmap& srcPixmap); 31 const SkPixmap& srcPixmap);
31 32
33 // Constructor to support producing an SkSpriteBlitter.
34 SkLinearBitmapPipeline(
35 SkPixmap& dstPixmap,
36 const SkPixmap& srcPixmap,
37 SkIPoint leftTop,
38 SkXfermode::Mode xferMode);
39
40 // Constructor to support producing an SkBlitter.
32 SkLinearBitmapPipeline( 41 SkLinearBitmapPipeline(
33 const SkLinearBitmapPipeline& pipeline, 42 const SkLinearBitmapPipeline& pipeline,
34 const SkPixmap& srcPixmap, 43 const SkPixmap& srcPixmap,
35 SkXfermode::Mode xferMode, 44 SkXfermode::Mode xferMode,
36 const SkImageInfo& dstInfo); 45 const SkImageInfo& dstInfo);
37 46
38 static bool ClonePipelineForBlitting( 47 static bool ClonePipelineForBlitting(
39 SkEmbeddableLinearPipeline* pipelineStorage, 48 SkEmbeddableLinearPipeline* pipelineStorage,
40 const SkLinearBitmapPipeline& pipeline, 49 const SkLinearBitmapPipeline& pipeline,
41 SkMatrix::TypeMask matrixMask, 50 SkMatrix::TypeMask matrixMask,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 private: 140 private:
132 enum { 141 enum {
133 kActualSize = sizeof(SkLinearBitmapPipeline), 142 kActualSize = sizeof(SkLinearBitmapPipeline),
134 kPaddedSize = SkAlignPtr(kActualSize + 12), 143 kPaddedSize = SkAlignPtr(kActualSize + 12),
135 }; 144 };
136 void* fPipelineStorage[kPaddedSize / sizeof(void*)]; 145 void* fPipelineStorage[kPaddedSize / sizeof(void*)];
137 SkLinearBitmapPipeline* fPipeline{nullptr}; 146 SkLinearBitmapPipeline* fPipeline{nullptr};
138 }; 147 };
139 148
140 #endif // SkLinearBitmapPipeline_DEFINED 149 #endif // SkLinearBitmapPipeline_DEFINED
OLDNEW
« src/core/SkBlitter_Sprite.cpp ('K') | « src/core/SkBlitter_Sprite.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698