aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-05 19:57:21 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-05 19:57:21 +0000
commit84405e095c063eec819e6daec699f22e5449c1cf (patch)
treedd4e13455d2c70490ad0e2f96dfe0aedae5e8d26 /include/gpu
parentc759af3444b6de633752496480e642d1ae8f90ea (diff)
make skpaint2grpaint functions be local to skgpudevice.cpp
Review URL: http://codereview.appspot.com/5726061/ git-svn-id: http://skia.googlecode.com/svn/trunk@3322 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/SkGpuDevice.h44
1 files changed, 2 insertions, 42 deletions
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index 6663ed520c..46c15d6ce7 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -114,6 +114,8 @@ public:
const SkMatrix& ctm,
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
+ class SkAutoCachedTexture; // used internally
+
protected:
typedef GrContext::TextureCacheEntry TexCache;
enum TexType {
@@ -128,29 +130,11 @@ protected:
const GrSamplerState& sampler) const;
void unlockCachedTexture(TexCache);
- class SkAutoCachedTexture {
- public:
- SkAutoCachedTexture();
- SkAutoCachedTexture(SkGpuDevice* device,
- const SkBitmap& bitmap,
- const GrSamplerState* sampler,
- GrTexture** texture);
- ~SkAutoCachedTexture();
-
- GrTexture* set(SkGpuDevice*, const SkBitmap&, const GrSamplerState*);
-
- private:
- SkGpuDevice* fDevice;
- TexCache fTex;
- };
- friend class SkAutoTexCache;
-
// overrides from SkDevice
virtual bool onReadPixels(const SkBitmap& bitmap,
int x, int y,
SkCanvas::Config8888 config8888) SK_OVERRIDE;
-
private:
GrContext* fContext;
@@ -166,30 +150,6 @@ private:
// called from rt and tex cons
void initFromRenderTarget(GrContext*, GrRenderTarget*);
- // doesn't set the texture/sampler/matrix state
- // caller needs to null out GrPaint's texture if
- // non-textured drawing is desired.
- // Set constantColor to true if a constant color
- // will be used. This is an optimization, and can
- // always be set to false. constantColor should
- // never be true if justAlpha is true.
- bool skPaint2GrPaintNoShader(const SkPaint& skPaint,
- bool justAlpha,
- GrPaint* grPaint,
- bool constantColor);
-
- // uses the SkShader to setup paint, act used to
- // hold lock on cached texture and free it when
- // destroyed.
- // If there is no shader, constantColor will
- // be passed to skPaint2GrPaintNoShader. Otherwise
- // it is ignored.
- bool skPaint2GrPaintShader(const SkPaint& skPaint,
- SkAutoCachedTexture* act,
- const SkMatrix& ctm,
- GrPaint* grPaint,
- bool constantColor);
-
// override from SkDevice
virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
int width, int height,