Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: gm/rebaseline_server/imagepairset.py

Issue 479613002: Add ability to output ImageBaseGSUrl to render_picture and use in rebaseline server (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix render_pictures_test after rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/rebaseline_server/imagepair_test.py ('k') | gm/rebaseline_server/imagepairset_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/imagepairset.py
diff --git a/gm/rebaseline_server/imagepairset.py b/gm/rebaseline_server/imagepairset.py
index a6101b908705597711986c4390c0720d6bfe4ba1..b492d9f021f53cb25c9d32197455a0bb8bcca038 100644
--- a/gm/rebaseline_server/imagepairset.py
+++ b/gm/rebaseline_server/imagepairset.py
@@ -57,7 +57,8 @@ class ImagePairSet(object):
self._descriptions = descriptions or DEFAULT_DESCRIPTIONS
self._extra_column_tallies = {} # maps column_id -> values
# -> instances_per_value
- self._image_base_url = None
+ self._imageA_base_url = None
+ self._imageB_base_url = None
self._diff_base_url = diff_base_url
# We build self._image_pair_objects incrementally as calls come into
@@ -70,11 +71,15 @@ class ImagePairSet(object):
"""Adds an ImagePair; this may be repeated any number of times."""
# Special handling when we add the first ImagePair...
if not self._image_pair_objects:
- self._image_base_url = image_pair.base_url
+ self._imageA_base_url = image_pair.imageA_base_url
+ self._imageB_base_url = image_pair.imageB_base_url
- if image_pair.base_url != self._image_base_url:
+ if(image_pair.imageA_base_url != self._imageA_base_url):
raise Exception('added ImagePair with base_url "%s" instead of "%s"' % (
- image_pair.base_url, self._image_base_url))
+ image_pair.imageA_base_url, self._imageA_base_url))
+ if(image_pair.imageB_base_url != self._imageB_base_url):
+ raise Exception('added ImagePair with base_url "%s" instead of "%s"' % (
+ image_pair.imageB_base_url, self._imageB_base_url))
self._image_pair_objects.append(image_pair)
extra_columns_dict = image_pair.extra_columns_dict
if extra_columns_dict:
@@ -171,10 +176,14 @@ class ImagePairSet(object):
key_description = KEY__IMAGESETS__FIELD__DESCRIPTION
key_base_url = KEY__IMAGESETS__FIELD__BASE_URL
- if gs_utils.GSUtils.is_gs_url(self._image_base_url):
- value_base_url = self._convert_gs_url_to_http_url(self._image_base_url)
+ if gs_utils.GSUtils.is_gs_url(self._imageA_base_url):
+ valueA_base_url = self._convert_gs_url_to_http_url(self._imageA_base_url)
+ else:
+ valueA_base_url = self._imageA_base_url
+ if gs_utils.GSUtils.is_gs_url(self._imageB_base_url):
+ valueB_base_url = self._convert_gs_url_to_http_url(self._imageB_base_url)
else:
- value_base_url = self._image_base_url
+ valueB_base_url = self._imageB_base_url
# We've waited as long as we can to ask ImageDiffDB for details of the
# image diffs, so that it has time to compute them.
@@ -188,11 +197,11 @@ class ImagePairSet(object):
KEY__ROOT__IMAGESETS: {
KEY__IMAGESETS__SET__IMAGE_A: {
key_description: self._descriptions[0],
- key_base_url: value_base_url,
+ key_base_url: valueA_base_url,
},
KEY__IMAGESETS__SET__IMAGE_B: {
key_description: self._descriptions[1],
- key_base_url: value_base_url,
+ key_base_url: valueB_base_url,
},
KEY__IMAGESETS__SET__DIFFS: {
key_description: 'color difference per channel',
« no previous file with comments | « gm/rebaseline_server/imagepair_test.py ('k') | gm/rebaseline_server/imagepairset_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698