bsalomon@google.com | 558a75b | 2011-08-08 17:01:14 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2011 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
egdaniel | 8dc7c3a | 2015-04-16 11:22:42 -0700 | [diff] [blame] | 9 | #include "GrStencilAttachment.h" |
bsalomon | 7775c85 | 2014-12-30 12:50:52 -0800 | [diff] [blame] | 10 | #include "GrResourceKey.h" |
bsalomon@google.com | 558a75b | 2011-08-08 17:01:14 +0000 | [diff] [blame] | 11 | |
egdaniel | 8dc7c3a | 2015-04-16 11:22:42 -0700 | [diff] [blame] | 12 | void GrStencilAttachment::ComputeSharedStencilAttachmentKey(int width, int height, int sampleCnt, |
| 13 | GrUniqueKey* key) { |
bsalomon | 02a44a4 | 2015-02-19 09:09:00 -0800 | [diff] [blame] | 14 | static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain(); |
| 15 | GrUniqueKey::Builder builder(key, kDomain, 3); |
| 16 | builder[0] = width; |
| 17 | builder[1] = height; |
| 18 | builder[2] = sampleCnt; |
robertphillips@google.com | 46a8600 | 2012-08-08 10:42:44 +0000 | [diff] [blame] | 19 | } |