aboutsummaryrefslogtreecommitdiffstats
path: root/include/utils/SkGLCanvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils/SkGLCanvas.h')
-rw-r--r--include/utils/SkGLCanvas.h47
1 files changed, 3 insertions, 44 deletions
diff --git a/include/utils/SkGLCanvas.h b/include/utils/SkGLCanvas.h
index 40fc52d..eb99527 100644
--- a/include/utils/SkGLCanvas.h
+++ b/include/utils/SkGLCanvas.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 The Android Open Source Project
+ * Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,31 +19,11 @@
#include "SkCanvas.h"
-#ifdef SK_BUILD_FOR_MAC
- #include <OpenGL/gl.h>
-#elif defined(ANDROID)
- #include <GLES/gl.h>
-#endif
-
-class SkGLDevice;
-class SkGLClipIter;
-
+// Deprecated. You should now use SkGLDevice and SkGLDeviceFactory with
+// SkCanvas.
class SkGLCanvas : public SkCanvas {
public:
- // notice, we do NOT allow the SkCanvas(bitmap) constructor, since that
- // does not create a SkGLDevice, which we require
SkGLCanvas();
- virtual ~SkGLCanvas();
-
- // overrides from SkCanvas
-
- virtual bool getViewport(SkIPoint*) const;
- virtual bool setViewport(int width, int height);
-
- virtual SkDevice* createDevice(SkBitmap::Config, int width, int height,
- bool isOpaque, bool isForLayer);
-
- // settings for the global texture cache
static size_t GetTextureCacheMaxCount();
static void SetTextureCacheMaxCount(size_t count);
@@ -51,30 +31,9 @@ public:
static size_t GetTextureCacheMaxSize();
static void SetTextureCacheMaxSize(size_t size);
- /** Call glDeleteTextures for all textures (including those for text)
- This should be called while the gl-context is still valid. Its purpose
- is to free up gl resources. Note that if a bitmap or text is drawn after
- this call, new caches will be created.
- */
static void DeleteAllTextures();
- /** Forget all textures without calling delete (including those for text).
- This should be called if the gl-context has changed, and the texture
- IDs that have been cached are no longer valid.
- */
static void AbandonAllTextures();
-
-private:
- SkIPoint fViewportSize;
-
- // need to disallow this guy
- virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap) {
- sk_throw();
- return NULL;
- }
-
- typedef SkCanvas INHERITED;
};
#endif
-