aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcShader.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-02 09:49:02 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-02 09:49:02 -0800
commit05a5647efed7fcbcc5bd1efa445a6a3ab445a6c3 (patch)
tree6413809dbabe4d433b978156969b0b4f3c06d83a /src/core/SkBitmapProcShader.h
parent391395dcfbff09a83f8f0e9d3e02d38c855ae2e9 (diff)
fission bitmapprocstate
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1753903002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1753903002
Diffstat (limited to 'src/core/SkBitmapProcShader.h')
-rw-r--r--src/core/SkBitmapProcShader.h25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/core/SkBitmapProcShader.h b/src/core/SkBitmapProcShader.h
index b897c6e500..9f4c16202c 100644
--- a/src/core/SkBitmapProcShader.h
+++ b/src/core/SkBitmapProcShader.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -6,7 +5,6 @@
* found in the LICENSE file.
*/
-
#ifndef SkBitmapProcShader_DEFINED
#define SkBitmapProcShader_DEFINED
@@ -23,7 +21,7 @@ public:
bool isOpaque() const override;
- size_t contextSize(const ContextRec&) const override { return ContextSize(); }
+ size_t contextSize(const ContextRec& rec) const override { return ContextSize(rec); }
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader)
@@ -34,25 +32,6 @@ public:
#endif
protected:
- class BitmapProcShaderContext : public SkShader::Context {
- public:
- // The context takes ownership of the state. It will call its destructor
- // but will NOT free the memory.
- BitmapProcShaderContext(const SkShader&, const ContextRec&, SkBitmapProcState*);
- ~BitmapProcShaderContext() override;
-
- void shadeSpan(int x, int y, SkPMColor dstC[], int count) override;
- ShadeProc asAShadeProc(void** ctx) override;
-
- uint32_t getFlags() const override { return fFlags; }
-
- private:
- SkBitmapProcState* fState;
- uint32_t fFlags;
-
- typedef SkShader::Context INHERITED;
- };
-
void flatten(SkWriteBuffer&) const override;
Context* onCreateContext(const ContextRec&, void* storage) const override;
bool onIsABitmap(SkBitmap*, SkMatrix*, TileMode*) const override;
@@ -63,7 +42,7 @@ protected:
private:
friend class SkImageShader;
- static size_t ContextSize();
+ static size_t ContextSize(const ContextRec&);
static Context* MakeContext(const SkShader&, TileMode tmx, TileMode tmy,
const SkBitmapProvider&, const ContextRec&, void* storage);