OLD | NEW |
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 "GrCaps.h" | 9 #include "GrCaps.h" |
10 #include "GrDrawingManager.h" | 10 #include "GrDrawingManager.h" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 // sort out what kind of clip mask needs to be created: alpha, stencil, | 276 // sort out what kind of clip mask needs to be created: alpha, stencil, |
277 // scissor, or entirely software | 277 // scissor, or entirely software |
278 bool GrClipMaskManager::setupClipping(const GrPipelineBuilder& pipelineBuilder, | 278 bool GrClipMaskManager::setupClipping(const GrPipelineBuilder& pipelineBuilder, |
279 GrPipelineBuilder::AutoRestoreStencil* ars
, | 279 GrPipelineBuilder::AutoRestoreStencil* ars
, |
280 const SkRect* devBounds, | 280 const SkRect* devBounds, |
281 GrAppliedClip* out) { | 281 GrAppliedClip* out) { |
282 if (kRespectClip_StencilClipMode == fClipMode) { | 282 if (kRespectClip_StencilClipMode == fClipMode) { |
283 fClipMode = kIgnoreClip_StencilClipMode; | 283 fClipMode = kIgnoreClip_StencilClipMode; |
284 } | 284 } |
285 | 285 |
286 GrReducedClip::ElementList elements(16); | 286 GrReducedClip::ElementList elements; |
287 int32_t genID = 0; | 287 int32_t genID = 0; |
288 GrReducedClip::InitialState initialState = GrReducedClip::kAllIn_InitialStat
e; | 288 GrReducedClip::InitialState initialState = GrReducedClip::kAllIn_InitialStat
e; |
289 SkIRect clipSpaceIBounds; | 289 SkIRect clipSpaceIBounds; |
290 bool requiresAA = false; | 290 bool requiresAA = false; |
291 GrRenderTarget* rt = pipelineBuilder.getRenderTarget(); | 291 GrRenderTarget* rt = pipelineBuilder.getRenderTarget(); |
292 | 292 |
293 // GrDrawTarget should have filtered this for us | 293 // GrDrawTarget should have filtered this for us |
294 SkASSERT(rt); | 294 SkASSERT(rt); |
295 | 295 |
296 SkIRect clipSpaceRTIBounds = SkIRect::MakeWH(rt->width(), rt->height()); | 296 SkIRect clipSpaceRTIBounds = SkIRect::MakeWH(rt->width(), rt->height()); |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 | 1096 |
1097 //////////////////////////////////////////////////////////////////////////////// | 1097 //////////////////////////////////////////////////////////////////////////////// |
1098 | 1098 |
1099 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, | 1099 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, |
1100 GrStencilSettings* settings) { | 1100 GrStencilSettings* settings) { |
1101 if (stencilAttachment) { | 1101 if (stencilAttachment) { |
1102 int stencilBits = stencilAttachment->bits(); | 1102 int stencilBits = stencilAttachment->bits(); |
1103 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1103 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1104 } | 1104 } |
1105 } | 1105 } |
OLD | NEW |