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

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

Issue 1816153002: Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines) (Closed) Base URL: https://skia.googlesource.com/skia.git@progSamplers
Patch Set: rebase Created 4 years, 9 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/GrStencil.h ('k') | src/gpu/gl/GrGLGpu.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 2011 Google Inc. 3 * Copyright 2011 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 9
10 #include "GrStencil.h" 10 #include "GrStencil.h"
11 11
12 #include "GrProcessor.h"
13
12 //////////////////////////////////////////////////////////////////////////////// 14 ////////////////////////////////////////////////////////////////////////////////
13 // Stencil Rules for Merging user stencil space into clip 15 // Stencil Rules for Merging user stencil space into clip
14 16
15 // We can't include the clip bit in the ref or mask values because the division 17 // We can't include the clip bit in the ref or mask values because the division
16 // between user and clip bits in the stencil depends on the number of stencil 18 // between user and clip bits in the stencil depends on the number of stencil
17 // bits in the runtime. Comments below indicate what the code should do to 19 // bits in the runtime. Comments below indicate what the code should do to
18 // incorporate the clip bit into these settings. 20 // incorporate the clip bit into these settings.
19 21
20 /////// 22 ///////
21 // Replace 23 // Replace
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 settings[1].fFuncMasks[kFront_Face]; 388 settings[1].fFuncMasks[kFront_Face];
387 settings[1].fFuncRefs[kBack_Face] = 389 settings[1].fFuncRefs[kBack_Face] =
388 settings[1].fFuncRefs[kFront_Face]; 390 settings[1].fFuncRefs[kFront_Face];
389 } 391 }
390 break; 392 break;
391 default: 393 default:
392 SkFAIL("Unknown set op"); 394 SkFAIL("Unknown set op");
393 } 395 }
394 return false; 396 return false;
395 } 397 }
398
399 void GrStencilSettings::genKey(GrProcessorKeyBuilder* b) const {
400 static const int kCount = sizeof(GrStencilSettings) / sizeof(uint32_t);
401 GR_STATIC_ASSERT(0 == sizeof(GrStencilSettings) % sizeof(uint32_t));
402 uint32_t* key = b->add32n(kCount);
403 memcpy(key, this, sizeof(GrStencilSettings));
404 }
OLDNEW
« no previous file with comments | « src/gpu/GrStencil.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698