aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkSurfaceCharacterization.cpp
blob: b82f2a681fe8067b53a3681e60306152b6087ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright 2018 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkSurfaceCharacterization.h"

#if SK_SUPPORT_GPU
bool SkSurfaceCharacterization::operator==(const SkSurfaceCharacterization& other) const {
    if (!this->isValid() || !other.isValid()) {
        return false;
    }

    if (fContextInfo->fContextUniqueID != other.fContextInfo->fContextUniqueID) {
        return false;
    }

    return fCacheMaxResourceBytes == other.fCacheMaxResourceBytes &&
           fOrigin == other.fOrigin &&
           fImageInfo == other.fImageInfo &&
           fConfig == other.fConfig &&
           fFSAAType == other.fFSAAType &&
           fStencilCnt == other.fStencilCnt &&
           fIsTextureable == other.fIsTextureable &&
           fIsMipMapped == other.fIsMipMapped &&
           fSurfaceProps == other.fSurfaceProps;
}

#endif