GrStencilAttachment.cpp 616 B

123456789101112131415161718
  1. /*
  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. #include "include/private/GrResourceKey.h"
  8. #include "src/gpu/GrStencilAttachment.h"
  9. void GrStencilAttachment::ComputeSharedStencilAttachmentKey(int width, int height, int sampleCnt,
  10. GrUniqueKey* key) {
  11. static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
  12. GrUniqueKey::Builder builder(key, kDomain, 3);
  13. builder[0] = width;
  14. builder[1] = height;
  15. builder[2] = sampleCnt;
  16. }