Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: src/gpu/GrClipMaskManager.cpp

Issue 1230813003: More threading of GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrBlurUtils.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "GrClipMaskManager.h" 8 #include "GrClipMaskManager.h"
9 #include "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 #include "GrAAHairLinePathRenderer.h" 10 #include "GrAAHairLinePathRenderer.h"
(...skipping 29 matching lines...) Expand all
40 SkMatrix mat; 40 SkMatrix mat;
41 // We use device coords to compute the texture coordinates. We set our matri x to be a 41 // We use device coords to compute the texture coordinates. We set our matri x to be a
42 // translation to the devBound, and then a scaling matrix to normalized coor ds. 42 // translation to the devBound, and then a scaling matrix to normalized coor ds.
43 mat.setIDiv(result->width(), result->height()); 43 mat.setIDiv(result->width(), result->height());
44 mat.preTranslate(SkIntToScalar(-devBound.fLeft), 44 mat.preTranslate(SkIntToScalar(-devBound.fLeft),
45 SkIntToScalar(-devBound.fTop)); 45 SkIntToScalar(-devBound.fTop));
46 46
47 SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height()); 47 SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height());
48 // This could be a long-lived effect that is cached with the alpha-mask. 48 // This could be a long-lived effect that is cached with the alpha-mask.
49 pipelineBuilder->addCoverageProcessor( 49 pipelineBuilder->addCoverageProcessor(
50 GrTextureDomainEffect::Create(result, 50 GrTextureDomainEffect::Create(pipelineBuilder->getProcessorDataManager() ,
51 result,
51 mat, 52 mat,
52 GrTextureDomain::MakeTexelDomain(result, d omainTexels), 53 GrTextureDomain::MakeTexelDomain(result, d omainTexels),
53 GrTextureDomain::kDecal_Mode, 54 GrTextureDomain::kDecal_Mode,
54 GrTextureParams::kNone_FilterMode, 55 GrTextureParams::kNone_FilterMode,
55 kDevice_GrCoordSet))->unref(); 56 kDevice_GrCoordSet))->unref();
56 } 57 }
57 58
58 bool path_needs_SW_renderer(GrContext* context, 59 bool path_needs_SW_renderer(GrContext* context,
59 const GrDrawTarget* gpu, 60 const GrDrawTarget* gpu,
60 const GrPipelineBuilder* pipelineBuilder, 61 const GrPipelineBuilder* pipelineBuilder,
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 const SkIRect& srcBound) { 474 const SkIRect& srcBound) {
474 pipelineBuilder->setRenderTarget(dstMask->asRenderTarget()); 475 pipelineBuilder->setRenderTarget(dstMask->asRenderTarget());
475 476
476 // We want to invert the coverage here 477 // We want to invert the coverage here
477 set_coverage_drawing_xpf(op, false, pipelineBuilder); 478 set_coverage_drawing_xpf(op, false, pipelineBuilder);
478 479
479 SkMatrix sampleM; 480 SkMatrix sampleM;
480 sampleM.setIDiv(srcMask->width(), srcMask->height()); 481 sampleM.setIDiv(srcMask->width(), srcMask->height());
481 482
482 pipelineBuilder->addCoverageProcessor( 483 pipelineBuilder->addCoverageProcessor(
483 GrTextureDomainEffect::Create(srcMask, 484 GrTextureDomainEffect::Create(pipelineBuilder->getProcessorDataManager() ,
485 srcMask,
484 sampleM, 486 sampleM,
485 GrTextureDomain::MakeTexelDomain(srcMask, srcBound), 487 GrTextureDomain::MakeTexelDomain(srcMask, srcBound),
486 GrTextureDomain::kDecal_Mode, 488 GrTextureDomain::kDecal_Mode,
487 GrTextureParams::kNone_FilterMode))->unref (); 489 GrTextureParams::kNone_FilterMode))->unref ();
488 490
489 // The color passed in here does not matter since the coverageSetOpXP won't read it. 491 // The color passed in here does not matter since the coverageSetOpXP won't read it.
490 fClipTarget->drawSimpleRect(pipelineBuilder, 492 fClipTarget->drawSimpleRect(pipelineBuilder,
491 GrColor_WHITE, 493 GrColor_WHITE,
492 SkMatrix::I(), 494 SkMatrix::I(),
493 SkRect::Make(dstBound)); 495 SkRect::Make(dstBound));
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 fAACache.purgeResources(); 1121 fAACache.purgeResources();
1120 } 1122 }
1121 1123
1122 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, 1124 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment,
1123 GrStencilSettings* settings) { 1125 GrStencilSettings* settings) {
1124 if (stencilAttachment) { 1126 if (stencilAttachment) {
1125 int stencilBits = stencilAttachment->bits(); 1127 int stencilBits = stencilAttachment->bits();
1126 this->adjustStencilParams(settings, fClipMode, stencilBits); 1128 this->adjustStencilParams(settings, fClipMode, stencilBits);
1127 } 1129 }
1128 } 1130 }
OLDNEW
« no previous file with comments | « src/gpu/GrBlurUtils.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698