blob: 9b07070b0f73cb4192843fe4e4be9a9aef4c2fcb [file] [log] [blame]
bsalomon@google.com558a75b2011-08-08 17:01:14 +00001
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
egdaniel8dc7c3a2015-04-16 11:22:42 -07009#include "GrStencilAttachment.h"
bsalomon7775c852014-12-30 12:50:52 -080010#include "GrResourceKey.h"
bsalomon@google.com558a75b2011-08-08 17:01:14 +000011
egdaniel8dc7c3a2015-04-16 11:22:42 -070012void GrStencilAttachment::ComputeSharedStencilAttachmentKey(int width, int height, int sampleCnt,
13 GrUniqueKey* key) {
bsalomon02a44a42015-02-19 09:09:00 -080014 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.com46a86002012-08-08 10:42:44 +000019}