• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 The PDFium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4"""PDFium implementation of //build/skia_gold_common/skia_gold_session.py."""
5
6from skia_gold_common import output_managerless_skia_gold_session as omsgs
7
8
9# ComparisonResults nested inside the SkiaGoldSession causes issues with
10# multiprocessing and pickling, so it was moved out here.
11class PDFiumComparisonResults:
12  """Struct-like object for storing results of an image comparison."""
13
14  def __init__(self):
15    self.public_triage_link = None
16    self.internal_triage_link = None
17    self.triage_link_omission_reason = None
18    self.local_diff_given_image = None
19    self.local_diff_closest_image = None
20    self.local_diff_diff_image = None
21
22
23class PDFiumSkiaGoldSession(omsgs.OutputManagerlessSkiaGoldSession):
24
25  def _GetDiffGoldInstance(self):
26    return str(self._instance)
27
28  def ComparisonResults(self):
29    return PDFiumComparisonResults()
30