| Index: src/gpu/GrRenderTarget.cpp
|
| diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
|
| index f18df2cfa6d71b9b2c665438a9dbf243e65c42a0..729aa0d469a086f5d1a3b1ce8b301cb3c4acc7f5 100644
|
| --- a/src/gpu/GrRenderTarget.cpp
|
| +++ b/src/gpu/GrRenderTarget.cpp
|
| @@ -54,6 +54,15 @@ void GrRenderTarget::resolve() {
|
| context->resolveRenderTarget(this);
|
| }
|
|
|
| +void GrRenderTarget::discard() {
|
| + // go through context so that all necessary flushing occurs
|
| + GrContext* context = this->getContext();
|
| + if (NULL == context) {
|
| + return;
|
| + }
|
| + context->discardRenderTarget(this);
|
| +}
|
| +
|
| size_t GrRenderTarget::sizeInBytes() const {
|
| size_t colorBits;
|
| if (kUnknown_GrPixelConfig == fDesc.fConfig) {
|
|
|