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

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

Issue 462203002: Add override to force bitmap rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reverse logic Created 6 years, 4 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 | « no previous file | src/gpu/GrSWMaskHelper.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 2012 Google Inc. 3 * Copyright 2012 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 "GrClipMaskManager.h" 9 #include "GrClipMaskManager.h"
10 #include "GrAAConvexPathRenderer.h" 10 #include "GrAAConvexPathRenderer.h"
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 1051
1052 // The mask texture may be larger than necessary. We round out the clip spac e bounds and pin 1052 // The mask texture may be larger than necessary. We round out the clip spac e bounds and pin
1053 // the top left corner of the resulting rect to the top left of the texture. 1053 // the top left corner of the resulting rect to the top left of the texture.
1054 SkIRect maskSpaceIBounds = SkIRect::MakeWH(clipSpaceIBounds.width(), clipSpa ceIBounds.height()); 1054 SkIRect maskSpaceIBounds = SkIRect::MakeWH(clipSpaceIBounds.width(), clipSpa ceIBounds.height());
1055 1055
1056 GrSWMaskHelper helper(this->getContext()); 1056 GrSWMaskHelper helper(this->getContext());
1057 1057
1058 SkMatrix matrix; 1058 SkMatrix matrix;
1059 matrix.setTranslate(SkIntToScalar(-clipSpaceIBounds.fLeft), 1059 matrix.setTranslate(SkIntToScalar(-clipSpaceIBounds.fLeft),
1060 SkIntToScalar(-clipSpaceIBounds.fTop)); 1060 SkIntToScalar(-clipSpaceIBounds.fTop));
1061 helper.init(maskSpaceIBounds, &matrix); 1061 helper.init(maskSpaceIBounds, &matrix, false);
1062 1062
1063 helper.clear(kAllIn_InitialState == initialState ? 0xFF : 0x00); 1063 helper.clear(kAllIn_InitialState == initialState ? 0xFF : 0x00);
1064 1064
1065 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); 1065 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
1066 1066
1067 for (ElementList::Iter iter(elements.headIter()) ; NULL != iter.get(); iter. next()) { 1067 for (ElementList::Iter iter(elements.headIter()) ; NULL != iter.get(); iter. next()) {
1068 1068
1069 const Element* element = iter.get(); 1069 const Element* element = iter.get();
1070 SkRegion::Op op = element->getOp(); 1070 SkRegion::Op op = element->getOp();
1071 1071
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1138
1139 // TODO: dynamically attach a stencil buffer 1139 // TODO: dynamically attach a stencil buffer
1140 int stencilBits = 0; 1140 int stencilBits = 0;
1141 GrStencilBuffer* stencilBuffer = 1141 GrStencilBuffer* stencilBuffer =
1142 drawState.getRenderTarget()->getStencilBuffer(); 1142 drawState.getRenderTarget()->getStencilBuffer();
1143 if (NULL != stencilBuffer) { 1143 if (NULL != stencilBuffer) {
1144 stencilBits = stencilBuffer->bits(); 1144 stencilBits = stencilBuffer->bits();
1145 this->adjustStencilParams(settings, clipMode, stencilBits); 1145 this->adjustStencilParams(settings, clipMode, stencilBits);
1146 } 1146 }
1147 } 1147 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698