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

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

Issue 787233003: Add XP to handle the cases where we disable color write. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 6 years 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 | « include/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/gpu/GrDefaultPathRenderer.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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 rt); 686 rt);
687 687
688 // walk through each clip element and perform its set op 688 // walk through each clip element and perform its set op
689 // with the existing clip. 689 // with the existing clip.
690 for (GrReducedClip::ElementList::Iter iter(elements.headIter()); iter.ge t(); iter.next()) { 690 for (GrReducedClip::ElementList::Iter iter(elements.headIter()); iter.ge t(); iter.next()) {
691 const Element* element = iter.get(); 691 const Element* element = iter.get();
692 692
693 GrDrawState drawState(matrix); 693 GrDrawState drawState(matrix);
694 drawState.setRenderTarget(rt); 694 drawState.setRenderTarget(rt);
695 drawState.enableState(GrDrawState::kClip_StateBit); 695 drawState.enableState(GrDrawState::kClip_StateBit);
696 drawState.enableState(GrDrawState::kNoColorWrites_StateBit); 696
697 drawState.setDisableColorXPFactory();
697 698
698 // if the target is MSAA then we want MSAA enabled when the clip is soft 699 // if the target is MSAA then we want MSAA enabled when the clip is soft
699 if (rt->isMultisampled()) { 700 if (rt->isMultisampled()) {
700 drawState.setState(GrDrawState::kHWAntialias_StateBit, element-> isAA()); 701 drawState.setState(GrDrawState::kHWAntialias_StateBit, element-> isAA());
701 } 702 }
702 703
703 bool fillInverted = false; 704 bool fillInverted = false;
704 // enabled at bottom of loop 705 // enabled at bottom of loop
705 fClipMode = kIgnoreClip_StencilClipMode; 706 fClipMode = kIgnoreClip_StencilClipMode;
706 707
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 } 1059 }
1059 1060
1060 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu ffer, 1061 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu ffer,
1061 GrStencilSettings* settings) { 1062 GrStencilSettings* settings) {
1062 // TODO: dynamically attach a stencil buffer 1063 // TODO: dynamically attach a stencil buffer
1063 if (stencilBuffer) { 1064 if (stencilBuffer) {
1064 int stencilBits = stencilBuffer->bits(); 1065 int stencilBits = stencilBuffer->bits();
1065 this->adjustStencilParams(settings, fClipMode, stencilBits); 1066 this->adjustStencilParams(settings, fClipMode, stencilBits);
1066 } 1067 }
1067 } 1068 }
OLDNEW
« no previous file with comments | « include/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698