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

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

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month 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/GrRenderTargetPriv.h ('k') | src/gpu/GrUserStencilSettings.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 8
9 #include "GrStencilSettings.h" 9 #include "GrStencilSettings.h"
10 10
(...skipping 10 matching lines...) Expand all
21 ); 21 );
22 22
23 GR_STATIC_ASSERT(kAll_StencilFlags == (gUnused.fFrontFlags[0] & gUnused.fBackFla gs[0])); 23 GR_STATIC_ASSERT(kAll_StencilFlags == (gUnused.fFrontFlags[0] & gUnused.fBackFla gs[0]));
24 24
25 const GrUserStencilSettings& GrUserStencilSettings::kUnused = gUnused; 25 const GrUserStencilSettings& GrUserStencilSettings::kUnused = gUnused;
26 26
27 void GrStencilSettings::reset(const GrUserStencilSettings& user, bool hasStencil Clip, 27 void GrStencilSettings::reset(const GrUserStencilSettings& user, bool hasStencil Clip,
28 int numStencilBits) { 28 int numStencilBits) {
29 uint16_t frontFlags = user.fFrontFlags[hasStencilClip]; 29 uint16_t frontFlags = user.fFrontFlags[hasStencilClip];
30 if (frontFlags & kSingleSided_StencilFlag) { 30 if (frontFlags & kSingleSided_StencilFlag) {
31 SkASSERT(frontFlags == user.fBackFlags[hasStencilClip]);
31 fFlags = frontFlags; 32 fFlags = frontFlags;
32 if (!this->isDisabled()) { 33 if (!this->isDisabled()) {
33 fFront.reset(user.fFront, hasStencilClip, numStencilBits); 34 fFront.reset(user.fFront, hasStencilClip, numStencilBits);
34 } 35 }
35 return; 36 return;
36 } 37 }
37 38
38 uint16_t backFlags = user.fBackFlags[hasStencilClip]; 39 uint16_t backFlags = user.fBackFlags[hasStencilClip];
39 fFlags = frontFlags & backFlags; 40 fFlags = frontFlags & backFlags;
40 if (this->isDisabled()) { 41 if (this->isDisabled()) {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 GR_STATIC_ASSERT(4 == offsetof(Face, fTestMask)); 481 GR_STATIC_ASSERT(4 == offsetof(Face, fTestMask));
481 GR_STATIC_ASSERT(2 == sizeof(Face::fTestMask)); 482 GR_STATIC_ASSERT(2 == sizeof(Face::fTestMask));
482 GR_STATIC_ASSERT(6 == offsetof(Face, fPassOp)); 483 GR_STATIC_ASSERT(6 == offsetof(Face, fPassOp));
483 GR_STATIC_ASSERT(1 == sizeof(Face::fPassOp)); 484 GR_STATIC_ASSERT(1 == sizeof(Face::fPassOp));
484 GR_STATIC_ASSERT(7 == offsetof(Face, fFailOp)); 485 GR_STATIC_ASSERT(7 == offsetof(Face, fFailOp));
485 GR_STATIC_ASSERT(1 == sizeof(Face::fFailOp)); 486 GR_STATIC_ASSERT(1 == sizeof(Face::fFailOp));
486 GR_STATIC_ASSERT(8 == offsetof(Face, fWriteMask)); 487 GR_STATIC_ASSERT(8 == offsetof(Face, fWriteMask));
487 GR_STATIC_ASSERT(2 == sizeof(Face::fWriteMask)); 488 GR_STATIC_ASSERT(2 == sizeof(Face::fWriteMask));
488 GR_STATIC_ASSERT(10 == sizeof(Face)); 489 GR_STATIC_ASSERT(10 == sizeof(Face));
489 } 490 }
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTargetPriv.h ('k') | src/gpu/GrUserStencilSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698