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 10 matching lines...) Expand all Loading... |
21 #include "GrVertexBuffer.h" | 21 #include "GrVertexBuffer.h" |
22 | 22 |
23 #include "batches/GrClearBatch.h" | 23 #include "batches/GrClearBatch.h" |
24 #include "batches/GrCopySurfaceBatch.h" | 24 #include "batches/GrCopySurfaceBatch.h" |
25 #include "batches/GrDiscardBatch.h" | 25 #include "batches/GrDiscardBatch.h" |
26 #include "batches/GrDrawBatch.h" | 26 #include "batches/GrDrawBatch.h" |
27 #include "batches/GrDrawPathBatch.h" | 27 #include "batches/GrDrawPathBatch.h" |
28 #include "batches/GrRectBatchFactory.h" | 28 #include "batches/GrRectBatchFactory.h" |
29 #include "batches/GrStencilPathBatch.h" | 29 #include "batches/GrStencilPathBatch.h" |
30 | 30 |
| 31 #include "SkGr.h" |
31 #include "SkStrokeRec.h" | 32 #include "SkStrokeRec.h" |
32 | 33 |
33 //////////////////////////////////////////////////////////////////////////////// | 34 //////////////////////////////////////////////////////////////////////////////// |
34 | 35 |
35 GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider) | 36 GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider) |
36 : fGpu(SkRef(gpu)) | 37 : fGpu(SkRef(gpu)) |
37 , fResourceProvider(resourceProvider) | 38 , fResourceProvider(resourceProvider) |
38 , fFlushing(false) | 39 , fFlushing(false) |
39 , fLastFlushToken(0) { | 40 , fLastFlushToken(0) { |
40 // TODO: Stop extracting the context (currently needed by GrClipMaskManager) | 41 // TODO: Stop extracting the context (currently needed by GrClipMaskManager) |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 } | 459 } |
459 | 460 |
460 return true; | 461 return true; |
461 } | 462 } |
462 | 463 |
463 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 464 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
464 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 465 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
465 this->recordBatch(batch); | 466 this->recordBatch(batch); |
466 batch->unref(); | 467 batch->unref(); |
467 } | 468 } |
OLD | NEW |