OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrDrawTarget.h" | 8 #include "GrDrawTarget.h" |
9 | 9 |
| 10 #include "GrAppliedClip.h" |
10 #include "GrAuditTrail.h" | 11 #include "GrAuditTrail.h" |
11 #include "GrCaps.h" | 12 #include "GrCaps.h" |
12 #include "GrDrawContext.h" | 13 #include "GrDrawContext.h" |
13 #include "GrGpu.h" | 14 #include "GrGpu.h" |
14 #include "GrGpuCommandBuffer.h" | 15 #include "GrGpuCommandBuffer.h" |
15 #include "GrPath.h" | 16 #include "GrPath.h" |
16 #include "GrPipeline.h" | 17 #include "GrPipeline.h" |
17 #include "GrMemoryPool.h" | 18 #include "GrMemoryPool.h" |
18 #include "GrPipelineBuilder.h" | 19 #include "GrPipelineBuilder.h" |
19 #include "GrRenderTarget.h" | 20 #include "GrRenderTarget.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 return; | 373 return; |
373 } | 374 } |
374 } | 375 } |
375 args.fOpts.fColorPOI.completeCalculations( | 376 args.fOpts.fColorPOI.completeCalculations( |
376 sk_sp_address_as_pointer_address(pipelineBuilder.fColorFragmentProcessor
s.begin()), | 377 sk_sp_address_as_pointer_address(pipelineBuilder.fColorFragmentProcessor
s.begin()), |
377 pipelineBuilder.numColorFragmentProcessors()); | 378 pipelineBuilder.numColorFragmentProcessors()); |
378 args.fOpts.fCoveragePOI.completeCalculations( | 379 args.fOpts.fCoveragePOI.completeCalculations( |
379 sk_sp_address_as_pointer_address(pipelineBuilder.fCoverageFragmentProces
sors.begin()), | 380 sk_sp_address_as_pointer_address(pipelineBuilder.fCoverageFragmentProces
sors.begin()), |
380 pipelineBuilder.numCoverageFragmentProcessors()); | 381 pipelineBuilder.numCoverageFragmentProcessors()); |
381 args.fScissor = &appliedClip.scissorState(); | 382 args.fScissor = &appliedClip.scissorState(); |
| 383 args.fWindowRects = &appliedClip.windowRects(); |
382 args.fHasStencilClip = appliedClip.hasStencilClip(); | 384 args.fHasStencilClip = appliedClip.hasStencilClip(); |
383 if (!this->setupDstReadIfNecessary(pipelineBuilder, drawContext->accessRende
rTarget(), | 385 if (!this->setupDstReadIfNecessary(pipelineBuilder, drawContext->accessRende
rTarget(), |
384 clip, args.fOpts, | 386 clip, args.fOpts, |
385 &args.fDstTexture, batch->bounds())) { | 387 &args.fDstTexture, batch->bounds())) { |
386 return; | 388 return; |
387 } | 389 } |
388 | 390 |
389 if (!batch->installPipeline(args)) { | 391 if (!batch->installPipeline(args)) { |
390 return; | 392 return; |
391 } | 393 } |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 } | 613 } |
612 } | 614 } |
613 | 615 |
614 /////////////////////////////////////////////////////////////////////////////// | 616 /////////////////////////////////////////////////////////////////////////////// |
615 | 617 |
616 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 618 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
617 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 619 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
618 this->recordBatch(batch, batch->bounds()); | 620 this->recordBatch(batch, batch->bounds()); |
619 batch->unref(); | 621 batch->unref(); |
620 } | 622 } |
OLD | NEW |