Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 13910009: Use blitframebuffer to implement copySurface. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/mixedxfermodes.cpp ('k') | src/gpu/gl/GrGLIRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
===================================================================
--- src/gpu/GrDrawTarget.cpp (revision 8613)
+++ src/gpu/GrDrawTarget.cpp (working copy)
@@ -411,12 +411,6 @@
return true;
}
GrRenderTarget* rt = this->drawState()->getRenderTarget();
- // If the dst is not a texture then we don't currently have a way of copying the
- // texture. TODO: API-specific impl of onCopySurface that can handle more cases.
- if (NULL == rt->asTexture()) {
- GrPrintf("Reading Dst of non-texture render target is not currently supported.\n");
- return false;
- }
const GrClipData* clip = this->getClip();
GrIRect copyRect;
@@ -435,11 +429,8 @@
#endif
}
- // The draw will resolve dst if it has MSAA. Two things to consider in the future:
- // 1) to make the dst values be pre-resolve we'd need to be able to copy to MSAA
- // texture and sample it correctly in the shader. 2) If 1 isn't available then we
- // should just resolve and use the resolved texture directly rather than making a
- // copy of it.
+ // MSAA consideration: When there is support for reading MSAA samples in the shader we could
+ // have per-sample dst values by making the copy multisampled.
GrTextureDesc desc;
desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit;
desc.fWidth = copyRect.width();
« no previous file with comments | « gm/mixedxfermodes.cpp ('k') | src/gpu/gl/GrGLIRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698