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

Unified Diff: src/core/SkBlitter.cpp

Issue 1153193014: delete (unused) TransparentShader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « src/animator/SkDrawTransparentShader.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter.cpp
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 5276356206b81e36dad1b9a7c1efa6111311dcd5..2ac7b511805b516dbd7e61273e4dbc1299ad3ae4 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -864,7 +864,7 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
*/
SkShader::Context* shaderContext = NULL;
if (shader) {
- SkShader::ContextRec rec(device, *paint, matrix);
+ SkShader::ContextRec rec(*paint, matrix, NULL);
size_t contextSize = shader->contextSize();
if (contextSize) {
// Try to create the ShaderContext
@@ -930,11 +930,11 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
///////////////////////////////////////////////////////////////////////////////
-class SkTransparentShaderContext : public SkShader::Context {
+class SkZeroShaderContext : public SkShader::Context {
public:
- SkTransparentShaderContext(const SkShader& shader, const SkShader::ContextRec& rec)
+ SkZeroShaderContext(const SkShader& shader, const SkShader::ContextRec& rec)
// Override rec with the identity matrix, so it is guaranteed to be invertible.
- : INHERITED(shader, SkShader::ContextRec(*rec.fDevice, *rec.fPaint, SkMatrix::I())) {}
+ : INHERITED(shader, SkShader::ContextRec(*rec.fPaint, SkMatrix::I(), NULL)) {}
void shadeSpan(int x, int y, SkPMColor colors[], int count) override {
sk_bzero(colors, count * sizeof(SkPMColor));
@@ -971,7 +971,7 @@ bool SkShaderBlitter::resetShaderContext(const SkShader::ContextRec& rec) {
if (NULL == ctx) {
// Need a valid context in fShaderContext's storage, so we can later (or our caller) call
// the in-place destructor.
- SkNEW_PLACEMENT_ARGS(fShaderContext, SkTransparentShaderContext, (*fShader, rec));
+ SkNEW_PLACEMENT_ARGS(fShaderContext, SkZeroShaderContext, (*fShader, rec));
return false;
}
return true;
« no previous file with comments | « src/animator/SkDrawTransparentShader.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698