blob: bcdeec5adb52e8470985117bd2398f77943b8518 [file] [log] [blame]
bsalomon@google.com558a75b2011-08-08 17:01:14 +00001/*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
egdaniel8dc7c3a2015-04-16 11:22:42 -07008#include "GrStencilAttachment.h"
bsalomon7775c852014-12-30 12:50:52 -08009#include "GrResourceKey.h"
bsalomon@google.com558a75b2011-08-08 17:01:14 +000010
egdaniel8dc7c3a2015-04-16 11:22:42 -070011void GrStencilAttachment::ComputeSharedStencilAttachmentKey(int width, int height, int sampleCnt,
12 GrUniqueKey* key) {
bsalomon02a44a42015-02-19 09:09:00 -080013 static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
14 GrUniqueKey::Builder builder(key, kDomain, 3);
15 builder[0] = width;
16 builder[1] = height;
17 builder[2] = sampleCnt;
robertphillips@google.com46a86002012-08-08 10:42:44 +000018}