Add code path for Gr client to resolve an Gr-created MSAA render target.
Review URL: http://codereview.appspot.com/5580049/
git-svn-id: http://skia.googlecode.com/svn/trunk@3112 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index 7901648..ed1a018 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -41,6 +41,15 @@
config, buffer, rowBytes);
}
+void GrRenderTarget::resolve() {
+ // go through context so that all necessary flushing occurs
+ GrContext* context = this->getContext();
+ if (NULL == context) {
+ return;
+ }
+ context->resolveRenderTarget(this);
+}
+
size_t GrRenderTarget::sizeInBytes() const {
int colorBits;
if (kUnknown_GrPixelConfig == fConfig) {