diff options
author | 2011-04-11 17:58:48 +0000 | |
---|---|---|
committer | 2011-04-11 17:58:48 +0000 | |
commit | 5877ffd5ea71a3ea70096d5c11c843798defa690 (patch) | |
tree | e9c898ced0fdd91487cd265618db1be03f920844 /gpu/src/GrGpu.cpp | |
parent | afac88855a31bea16143028f51935d00be177dc6 (diff) |
Add APIs and plumbing for external rendertaret-textures w/ and w/out MSAA.
Review URL: http://codereview.appspot.com/4388049/
git-svn-id: http://skia.googlecode.com/svn/trunk@1102 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpu.cpp')
-rw-r--r-- | gpu/src/GrGpu.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gpu/src/GrGpu.cpp b/gpu/src/GrGpu.cpp index 4aaed7943b..2407cdf85c 100644 --- a/gpu/src/GrGpu.cpp +++ b/gpu/src/GrGpu.cpp @@ -158,6 +158,11 @@ GrRenderTarget* GrGpu::createRenderTargetFrom3DApiState() { return this->createRenderTargetFrom3DApiStateHelper(); } +GrResource* GrGpu::createPlatformSurface(const GrPlatformSurfaceDesc& desc) { + this->handleDirtyContext(); + return this->onCreatePlatformSurface(desc); +} + GrVertexBuffer* GrGpu::createVertexBuffer(uint32_t size, bool dynamic) { this->handleDirtyContext(); return this->createVertexBufferHelper(size, dynamic); @@ -183,12 +188,7 @@ bool GrGpu::readPixels(GrRenderTarget* target, GrPixelConfig config, void* buffer) { this->handleDirtyContext(); - GrRenderTarget* prevTarget = fCurrDrawState.fRenderTarget; - if (NULL != target) { - fCurrDrawState.fRenderTarget = target; - } - return this->readPixelsHelper(left, top, width, height, config, buffer); - fCurrDrawState.fRenderTarget = prevTarget; + return this->onReadPixels(target, left, top, width, height, config, buffer); } //////////////////////////////////////////////////////////////////////////////// |