aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-06-05 11:31:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-05 11:31:26 -0700
commit56263c78d86cb536d463b8d46f00ac44cad3defb (patch)
treec43997464263ed75c154419ee403a54fc0ad0163 /include
parentb500ffa1a253dca35a7ff846ebece9fe570e3565 (diff)
delete (unused) TransparentShader
BUG=skia: TBR= Review URL: https://codereview.chromium.org/1153193014
Diffstat (limited to 'include')
-rw-r--r--include/core/SkShader.h10
-rw-r--r--include/effects/SkTransparentShader.h47
2 files changed, 3 insertions, 54 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 4c4dba3e32..3739c9c73c 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -5,7 +5,6 @@
* found in the LICENSE file.
*/
-
#ifndef SkShader_DEFINED
#define SkShader_DEFINED
@@ -114,14 +113,11 @@ public:
* ContextRec acts as a parameter bundle for creating Contexts.
*/
struct ContextRec {
- ContextRec() : fDevice(NULL), fPaint(NULL), fMatrix(NULL), fLocalMatrix(NULL) {}
- ContextRec(const SkBitmap& device, const SkPaint& paint, const SkMatrix& matrix)
- : fDevice(&device)
- , fPaint(&paint)
+ ContextRec(const SkPaint& paint, const SkMatrix& matrix, const SkMatrix* localM)
+ : fPaint(&paint)
, fMatrix(&matrix)
- , fLocalMatrix(NULL) {}
+ , fLocalMatrix(localM) {}
- const SkBitmap* fDevice; // the bitmap we are drawing into
const SkPaint* fPaint; // the current paint associated with the draw
const SkMatrix* fMatrix; // the current matrix in the canvas
const SkMatrix* fLocalMatrix; // optional local matrix
diff --git a/include/effects/SkTransparentShader.h b/include/effects/SkTransparentShader.h
deleted file mode 100644
index 11aa086fa4..0000000000
--- a/include/effects/SkTransparentShader.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2006 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkTransparentShader_DEFINED
-#define SkTransparentShader_DEFINED
-
-#include "SkShader.h"
-
-class SK_API SkTransparentShader : public SkShader {
-public:
- SkTransparentShader() {}
-
- size_t contextSize() const override;
-
- class TransparentShaderContext : public SkShader::Context {
- public:
- TransparentShaderContext(const SkTransparentShader& shader, const ContextRec&);
- virtual ~TransparentShaderContext();
-
- uint32_t getFlags() const override;
- void shadeSpan(int x, int y, SkPMColor[], int count) override;
- void shadeSpan16(int x, int y, uint16_t span[], int count) override;
-
- private:
- const SkBitmap* fDevice;
-
- typedef SkShader::Context INHERITED;
- };
-
- SK_TO_STRING_OVERRIDE()
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTransparentShader)
-
-protected:
- Context* onCreateContext(const ContextRec&, void* storage) const override;
-
- // we don't need to flatten anything at all
- void flatten(SkWriteBuffer&) const override {}
-
-private:
- typedef SkShader INHERITED;
-};
-
-#endif