| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 #include "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 //////////////////////////////////////////////////////////////////////////////// | 33 //////////////////////////////////////////////////////////////////////////////// |
| 34 | 34 |
| 35 GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider) | 35 GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider) |
| 36 : fGpu(SkRef(gpu)) | 36 : fGpu(SkRef(gpu)) |
| 37 , fResourceProvider(resourceProvider) | 37 , fResourceProvider(resourceProvider) |
| 38 , fFlushing(false) | 38 , fFlushing(false) |
| 39 , fLastFlushToken(0) { | 39 , fLastFlushToken(0) { |
| 40 // TODO: Stop extracting the context (currently needed by GrClipMaskManager) | 40 // TODO: Stop extracting the context (currently needed by GrClipMaskManager) |
| 41 fContext = fGpu->getContext(); | 41 fContext = fGpu->getContext(); |
| 42 fClipMaskManager.reset(new GrClipMaskManager(this)); |
| 42 } | 43 } |
| 43 | 44 |
| 44 GrDrawTarget::~GrDrawTarget() { | 45 GrDrawTarget::~GrDrawTarget() { |
| 45 fGpu->unref(); | 46 fGpu->unref(); |
| 46 } | 47 } |
| 47 | 48 |
| 48 //////////////////////////////////////////////////////////////////////////////// | 49 //////////////////////////////////////////////////////////////////////////////// |
| 49 | 50 |
| 50 bool GrDrawTarget::setupDstReadIfNecessary(const GrPipelineBuilder& pipelineBuil
der, | 51 bool GrDrawTarget::setupDstReadIfNecessary(const GrPipelineBuilder& pipelineBuil
der, |
| 51 const GrProcOptInfo& colorPOI, | 52 const GrProcOptInfo& colorPOI, |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 } | 458 } |
| 458 | 459 |
| 459 return true; | 460 return true; |
| 460 } | 461 } |
| 461 | 462 |
| 462 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 463 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
| 463 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 464 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
| 464 this->recordBatch(batch); | 465 this->recordBatch(batch); |
| 465 batch->unref(); | 466 batch->unref(); |
| 466 } | 467 } |
| OLD | NEW |