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

Unified Diff: gm/rebaseline_server/compare_rendered_pictures.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/compare_configs.py ('k') | gm/rebaseline_server/compare_rendered_pictures_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/compare_rendered_pictures.py
diff --git a/gm/rebaseline_server/compare_rendered_pictures.py b/gm/rebaseline_server/compare_rendered_pictures.py
index 399117d61191fbea40ba882f1a3e9bc72c47209d..73cb36b430fa6e0816e3feec892f93616c28e3ac 100755
--- a/gm/rebaseline_server/compare_rendered_pictures.py
+++ b/gm/rebaseline_server/compare_rendered_pictures.py
@@ -268,18 +268,25 @@ class RenderedPicturesComparisons(results.BaseComparisons):
self._validate_dict_version(dictB)
dictB_results = self.get_default(dictB, {}, setB_section)
+ image_A_base_url = self.get_default(
+ setA_dicts, self._image_base_gs_url, dict_path,
+ gm_json.JSONKEY_IMAGE_BASE_GS_URL)
+ image_B_base_url = self.get_default(
+ setB_dicts, self._image_base_gs_url, dict_path,
+ gm_json.JSONKEY_IMAGE_BASE_GS_URL)
+
# get the builders and render modes for each set
- builder_A = self.get_default(dictA, None,
- gm_json.JSONKEY_DESCRIPTIONS,
+ builder_A = self.get_default(dictA, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
- render_mode_A = self.get_default(dictA, None,
- gm_json.JSONKEY_DESCRIPTIONS,
+ render_mode_A = self.get_default(dictA, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
gm_json.JSONKEY_DESCRIPTIONS_RENDER_MODE)
- builder_B = self.get_default(dictB, None,
- gm_json.JSONKEY_DESCRIPTIONS,
+ builder_B = self.get_default(dictB, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
- render_mode_B = self.get_default(dictB, None,
- gm_json.JSONKEY_DESCRIPTIONS,
+ render_mode_B = self.get_default(dictB, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
gm_json.JSONKEY_DESCRIPTIONS_RENDER_MODE)
skp_names = sorted(set(dictA_results.keys() + dictB_results.keys()))
@@ -295,8 +302,11 @@ class RenderedPicturesComparisons(results.BaseComparisons):
whole_image_B = self.get_default(
dictB_results, None,
skp_name, gm_json.JSONKEY_SOURCE_WHOLEIMAGE)
+
imagepairs_for_this_skp.append(self._create_image_pair(
image_dict_A=whole_image_A, image_dict_B=whole_image_B,
+ image_A_base_url=image_A_base_url,
+ image_B_base_url=image_B_base_url,
builder_A=builder_A, render_mode_A=render_mode_A,
builder_B=builder_B, render_mode_B=render_mode_B,
source_json_file=dict_path,
@@ -318,6 +328,8 @@ class RenderedPicturesComparisons(results.BaseComparisons):
if tile_num < num_tiles_A else None),
image_dict_B=(tiled_images_B[tile_num]
if tile_num < num_tiles_B else None),
+ image_A_base_url=image_A_base_url,
+ image_B_base_url=image_B_base_url,
builder_A=builder_A, render_mode_A=render_mode_A,
builder_B=builder_B, render_mode_B=render_mode_B,
source_json_file=dict_path,
@@ -368,8 +380,9 @@ class RenderedPicturesComparisons(results.BaseComparisons):
raise Exception('expected header_revision %d, but got %d' % (
expected_header_revision, header_revision))
- def _create_image_pair(self, image_dict_A, image_dict_B,
- builder_A, render_mode_A,
+ def _create_image_pair(self, image_dict_A, image_dict_B,
+ image_A_base_url, image_B_base_url,
+ builder_A, render_mode_A,
builder_B, render_mode_B,
source_json_file,
source_skp_name, tilenum):
@@ -378,11 +391,13 @@ class RenderedPicturesComparisons(results.BaseComparisons):
Args:
image_dict_A: dict with JSONKEY_IMAGE_* keys, or None if no image
image_dict_B: dict with JSONKEY_IMAGE_* keys, or None if no image
+ image_A_base_url: base URL for image A
+ image_B_base_url: base URL for image B
builder_A: builder that created image set A or None if unknow
- render_mode_A: render mode used to generate image set A or None if
+ render_mode_A: render mode used to generate image set A or None if
unknown.
builder_B: builder that created image set A or None if unknow
- render_mode_B: render mode used to generate image set A or None if
+ render_mode_B: render mode used to generate image set A or None if
unknown.
source_json_file: string; relative path of the JSON file where this
result came from, within setA and setB.
@@ -436,7 +451,8 @@ class RenderedPicturesComparisons(results.BaseComparisons):
try:
return imagepair.ImagePair(
image_diff_db=self._image_diff_db,
- base_url=self._image_base_gs_url,
+ imageA_base_url=image_A_base_url,
+ imageB_base_url=image_B_base_url,
imageA_relative_url=imageA_relative_url,
imageB_relative_url=imageB_relative_url,
extra_columns=extra_columns_dict,
« no previous file with comments | « gm/rebaseline_server/compare_configs.py ('k') | gm/rebaseline_server/compare_rendered_pictures_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698