| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "GrRenderTarget.h" | 10 #include "GrRenderTarget.h" |
| 11 | 11 |
| 12 #include "GrContext.h" | 12 #include "GrContext.h" |
| 13 #include "GrGpu.h" | 13 #include "GrGpu.h" |
| 14 #include "GrStencilBuffer.h" | 14 #include "GrStencilBuffer.h" |
| 15 | 15 |
| 16 SK_DEFINE_INST_COUNT(GrRenderTarget) | |
| 17 | |
| 18 bool GrRenderTarget::readPixels(int left, int top, int width, int height, | 16 bool GrRenderTarget::readPixels(int left, int top, int width, int height, |
| 19 GrPixelConfig config, | 17 GrPixelConfig config, |
| 20 void* buffer, | 18 void* buffer, |
| 21 size_t rowBytes, | 19 size_t rowBytes, |
| 22 uint32_t pixelOpsFlags) { | 20 uint32_t pixelOpsFlags) { |
| 23 // go through context so that all necessary flushing occurs | 21 // go through context so that all necessary flushing occurs |
| 24 GrContext* context = this->getContext(); | 22 GrContext* context = this->getContext(); |
| 25 if (NULL == context) { | 23 if (NULL == context) { |
| 26 return false; | 24 return false; |
| 27 } | 25 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 this->setStencilBuffer(NULL); | 100 this->setStencilBuffer(NULL); |
| 103 | 101 |
| 104 INHERITED::onRelease(); | 102 INHERITED::onRelease(); |
| 105 } | 103 } |
| 106 | 104 |
| 107 void GrRenderTarget::onAbandon() { | 105 void GrRenderTarget::onAbandon() { |
| 108 this->setStencilBuffer(NULL); | 106 this->setStencilBuffer(NULL); |
| 109 | 107 |
| 110 INHERITED::onAbandon(); | 108 INHERITED::onAbandon(); |
| 111 } | 109 } |
| OLD | NEW |