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

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

Issue 1144013007: Remove GrContext from GrClipMaskCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 years, 6 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/GrDrawTarget.h ('k') | src/gpu/GrResourceProvider.h » ('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 /* 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 , fScissor(scissor) { 533 , fScissor(scissor) {
534 fColorPOI = fPipelineBuilder->colorProcInfo(batch); 534 fColorPOI = fPipelineBuilder->colorProcInfo(batch);
535 fCoveragePOI = fPipelineBuilder->coverageProcInfo(batch); 535 fCoveragePOI = fPipelineBuilder->coverageProcInfo(batch);
536 if (!target->setupDstReadIfNecessary(*fPipelineBuilder, fColorPOI, fCoverage POI, 536 if (!target->setupDstReadIfNecessary(*fPipelineBuilder, fColorPOI, fCoverage POI,
537 &fDstTexture, devBounds)) { 537 &fDstTexture, devBounds)) {
538 fPipelineBuilder = NULL; 538 fPipelineBuilder = NULL;
539 } 539 }
540 } 540 }
541 541
542 /////////////////////////////////////////////////////////////////////////////// 542 ///////////////////////////////////////////////////////////////////////////////
543 GrClipTarget::GrClipTarget(GrContext* context) : INHERITED(context) {
544 fClipMaskManager.reset(SkNEW_ARGS(GrClipMaskManager, (this)));
545 }
546
543 547
544 bool GrClipTarget::setupClip(GrPipelineBuilder* pipelineBuilder, 548 bool GrClipTarget::setupClip(GrPipelineBuilder* pipelineBuilder,
545 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp, 549 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp,
546 GrPipelineBuilder::AutoRestoreStencil* ars, 550 GrPipelineBuilder::AutoRestoreStencil* ars,
547 GrScissorState* scissorState, 551 GrScissorState* scissorState,
548 const SkRect* devBounds) { 552 const SkRect* devBounds) {
549 return fClipMaskManager.setupClipping(pipelineBuilder, 553 return fClipMaskManager->setupClipping(pipelineBuilder,
550 arfp, 554 arfp,
551 ars, 555 ars,
552 scissorState, 556 scissorState,
553 devBounds); 557 devBounds);
554 } 558 }
559
560 void GrClipTarget::purgeResources() {
561 // The clip mask manager can rebuild all its clip masks so just
562 // get rid of them all.
563 fClipMaskManager->purgeResources();
564 };
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698