aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGpuGL.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-10 14:13:19 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-10 14:13:19 +0000
commita7f84e150cb9e821267a8ca9e59c1ae9a3cfa300 (patch)
tree92d0c75a44d7ecfbb0a208fa6f9837ef071a8395 /gpu/src/GrGpuGL.h
parent63a6060fcdc16245ea3958e7fd88ae32c5e631a3 (diff)
Make flush discardable and lazily reset context
Review URL: http://codereview.appspot.com/4259059/ git-svn-id: http://skia.googlecode.com/svn/trunk@914 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpuGL.h')
-rw-r--r--gpu/src/GrGpuGL.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/gpu/src/GrGpuGL.h b/gpu/src/GrGpuGL.h
index a2905c5d30..ab504adbb2 100644
--- a/gpu/src/GrGpuGL.h
+++ b/gpu/src/GrGpuGL.h
@@ -31,28 +31,6 @@ public:
GrGpuGL();
virtual ~GrGpuGL();
- // overrides from GrGpu
- virtual void resetContext();
-
- virtual GrTexture* createTexture(const TextureDesc& desc,
- const void* srcData, size_t rowBytes);
- virtual GrVertexBuffer* createVertexBuffer(uint32_t size, bool dynamic);
- virtual GrIndexBuffer* createIndexBuffer(uint32_t size, bool dynamic);
-
- virtual GrRenderTarget* createPlatformRenderTarget(
- intptr_t platformRenderTarget,
- int stencilBits,
- int width, int height);
-
- virtual GrRenderTarget* createRenderTargetFrom3DApiState();
-
- virtual void eraseColor(GrColor color);
-
- virtual void forceRenderTargetFlush();
-
- virtual bool readPixels(int left, int top, int width, int height,
- GrTexture::PixelConfig, void* buffer);
-
/**
* Gets the struct containing the GL extensions for the context
* underlying the GrGpuGL
@@ -97,6 +75,31 @@ protected:
GrGLExts fExts;
// GrGpu overrides
+ // overrides from GrGpu
+ virtual void resetContext();
+
+ virtual GrTexture* createTextureHelper(const TextureDesc& desc,
+ const void* srcData,
+ size_t rowBytes);
+ virtual GrVertexBuffer* createVertexBufferHelper(uint32_t size,
+ bool dynamic);
+ virtual GrIndexBuffer* createIndexBufferHelper(uint32_t size,
+ bool dynamic);
+
+ virtual GrRenderTarget* createPlatformRenderTargetHelper(
+ intptr_t platformRenderTarget,
+ int stencilBits,
+ int width, int height);
+
+ virtual GrRenderTarget* createRenderTargetFrom3DApiStateHelper();
+
+ virtual void eraseColorHelper(GrColor color);
+
+ virtual void forceRenderTargetFlushHelper();
+
+ virtual bool readPixelsHelper(int left, int top, int width, int height,
+ GrTexture::PixelConfig, void* buffer);
+
virtual void drawIndexedHelper(GrPrimitiveType type,
uint32_t startVertex,
uint32_t startIndex,
@@ -140,8 +143,6 @@ protected:
const GrSamplerState& sampler);
private:
- void resetContextHelper();
-
// notify callbacks to update state tracking when related
// objects are bound to GL or deleted outside of the class
void notifyVertexBufferBind(const GrGLVertexBuffer* buffer);
@@ -190,4 +191,4 @@ private:
typedef GrGpu INHERITED;
};
-#endif \ No newline at end of file
+#endif