move SkFilterShader into private header
Review URL: https://codereview.appspot.com/6454107 git-svn-id: http://skia.googlecode.com/svn/trunk@4961 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
e2faf17bcc
commit
02f65f2d91
@ -120,33 +120,4 @@ private:
|
||||
typedef SkFlattenable INHERITED;
|
||||
};
|
||||
|
||||
#include "SkShader.h"
|
||||
|
||||
class SkFilterShader : public SkShader {
|
||||
public:
|
||||
SkFilterShader(SkShader* shader, SkColorFilter* filter);
|
||||
virtual ~SkFilterShader();
|
||||
|
||||
// override
|
||||
virtual uint32_t getFlags();
|
||||
virtual bool setContext(const SkBitmap& device, const SkPaint& paint,
|
||||
const SkMatrix& matrix);
|
||||
virtual void shadeSpan(int x, int y, SkPMColor result[], int count);
|
||||
virtual void shadeSpan16(int x, int y, uint16_t result[], int count);
|
||||
virtual void beginSession();
|
||||
virtual void endSession();
|
||||
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader)
|
||||
|
||||
protected:
|
||||
SkFilterShader(SkFlattenableReadBuffer& );
|
||||
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
|
||||
|
||||
private:
|
||||
SkShader* fShader;
|
||||
SkColorFilter* fFilter;
|
||||
|
||||
typedef SkShader INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "SkAntiRun.h"
|
||||
#include "SkColor.h"
|
||||
#include "SkColorFilter.h"
|
||||
#include "SkFilterShader.h"
|
||||
#include "SkMask.h"
|
||||
#include "SkMaskFilter.h"
|
||||
#include "SkTemplatesPriv.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Copyright 2006 The Android Open Source Project
|
||||
*
|
||||
@ -6,8 +5,8 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
|
||||
#include "SkColorFilter.h"
|
||||
#include "SkFilterShader.h"
|
||||
#include "SkShader.h"
|
||||
#include "SkUnPreMultiply.h"
|
||||
|
||||
|
42
src/core/SkFilterShader.h
Normal file
42
src/core/SkFilterShader.h
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2012 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef SkFilterShader_DEFINED
|
||||
#define SkFilterShader_DEFINED
|
||||
|
||||
#include "SkShader.h"
|
||||
|
||||
class SkColorFilter;
|
||||
|
||||
class SkFilterShader : public SkShader {
|
||||
public:
|
||||
SkFilterShader(SkShader* shader, SkColorFilter* filter);
|
||||
virtual ~SkFilterShader();
|
||||
|
||||
// override
|
||||
virtual uint32_t getFlags();
|
||||
virtual bool setContext(const SkBitmap& device, const SkPaint& paint,
|
||||
const SkMatrix& matrix);
|
||||
virtual void shadeSpan(int x, int y, SkPMColor result[], int count);
|
||||
virtual void shadeSpan16(int x, int y, uint16_t result[], int count);
|
||||
virtual void beginSession();
|
||||
virtual void endSession();
|
||||
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader)
|
||||
|
||||
protected:
|
||||
SkFilterShader(SkFlattenableReadBuffer& );
|
||||
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
|
||||
|
||||
private:
|
||||
SkShader* fShader;
|
||||
SkColorFilter* fFilter;
|
||||
|
||||
typedef SkShader INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,3 +1,4 @@
|
||||
#include "SkBitmap.h"
|
||||
#include "SkColorPriv.h"
|
||||
#include "SkTableColorFilter.h"
|
||||
#include "SkUnPreMultiply.h"
|
||||
|
Loading…
Reference in New Issue
Block a user