blob: 9f7d1981de9b3212c55a895c78ca70da9a02d1fa [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2021 The PDFium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""PDFium implementation of //build/skia_gold_common/"""
# pylint: disable=relative-import
from skia_gold_common import output_managerless_skia_gold_session as omsgs
# ComparisonResults nested inside the SkiaGoldSession causes issues with
# multiprocessing and pickling, so it was moved out here.
class PDFiumComparisonResults(object):
"""Struct-like object for storing results of an image comparison."""
def __init__(self):
self.public_triage_link = None
self.internal_triage_link = None
self.triage_link_omission_reason = None
self.local_diff_given_image = None
self.local_diff_closest_image = None
self.local_diff_diff_image = None
class PDFiumSkiaGoldSession(omsgs.OutputManagerlessSkiaGoldSession):
def _GetDiffGoldInstance(self):
return str(self._instance)
def ComparisonResults(self):
return PDFiumComparisonResults()