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

Unified Diff: gm/rebaseline_server/compare_rendered_pictures.py

Issue 480153002: Added 'renderMode' and 'builder' as columns to the SKP front-end. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Addressing issues from CR 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
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 265f997de97b25a1df92f0279767b87c3e49fe12..91bce02eac2fc0054fc1111c5d80bcb2abe1a7ba 100755
--- a/gm/rebaseline_server/compare_rendered_pictures.py
+++ b/gm/rebaseline_server/compare_rendered_pictures.py
@@ -21,7 +21,7 @@ import tempfile
import time
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
from py.utils import git_utils
@@ -47,6 +47,11 @@ COLUMN__RESULT_TYPE = results.KEY__EXTRACOLUMNS__RESULT_TYPE
COLUMN__SOURCE_SKP = 'sourceSkpFile'
COLUMN__TILED_OR_WHOLE = 'tiledOrWhole'
COLUMN__TILENUM = 'tilenum'
+COLUMN__BUILDER_A = 'builderA'
+COLUMN__RENDER_MODE_A = 'renderModeA'
+COLUMN__BUILDER_B = 'builderB'
+COLUMN__RENDER_MODE_B = 'renderModeB'
+
FREEFORM_COLUMN_IDS = [
COLUMN__SOURCE_SKP,
COLUMN__TILENUM,
@@ -56,6 +61,10 @@ ORDERED_COLUMN_IDS = [
COLUMN__SOURCE_SKP,
COLUMN__TILED_OR_WHOLE,
COLUMN__TILENUM,
+ COLUMN__BUILDER_A,
+ COLUMN__RENDER_MODE_A,
+ COLUMN__BUILDER_B,
+ COLUMN__RENDER_MODE_B,
]
# A special "repo:" URL type that we use to refer to Skia repo contents.
@@ -262,6 +271,20 @@ class RenderedPicturesComparisons(results.BaseComparisons):
self._validate_dict_version(dictB)
dictB_results = self.get_default(dictB, {}, setB_section)
+ # get the builders and render modes for each set
+ builder_A = self.get_default(dictA, None,
epoger 2014/08/18 20:34:49 Ravi will cite https://engdoc.corp.google.com/eng/
+ gm_json.JSONKEY_DESCRIPTIONS,
+ gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
+ 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,
+ gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
+ 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()))
# Just for manual testing... truncate to an arbitrary subset.
if self.truncate_results:
@@ -277,6 +300,8 @@ class RenderedPicturesComparisons(results.BaseComparisons):
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,
+ builder_A=builder_A, render_mode_A=render_mode_A,
+ builder_B=builder_B, render_mode_B=render_mode_B,
source_skp_name=skp_name, tilenum=None))
tiled_images_A = self.get_default(
@@ -295,6 +320,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),
+ builder_A=builder_A, render_mode_A=render_mode_A,
+ builder_B=builder_B, render_mode_B=render_mode_B,
source_skp_name=skp_name, tilenum=tile_num))
for one_imagepair in imagepairs_for_this_skp:
@@ -340,13 +367,22 @@ 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, source_skp_name,
+ def _create_image_pair(self, image_dict_A, image_dict_B,
+ builder_A, render_mode_A,
+ builder_B, render_mode_B,
+ source_skp_name,
tilenum):
"""Creates an ImagePair object for this pair of images.
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
+ 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
+ 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
+ unknown.
source_skp_name: string; name of the source SKP file
tilenum: which tile, or None if a wholeimage
@@ -382,6 +418,10 @@ class RenderedPicturesComparisons(results.BaseComparisons):
extra_columns_dict = {
COLUMN__RESULT_TYPE: result_type,
COLUMN__SOURCE_SKP: source_skp_name,
+ COLUMN__BUILDER_A: builder_A,
+ COLUMN__RENDER_MODE_A: render_mode_A,
+ COLUMN__BUILDER_B: builder_B,
+ COLUMN__RENDER_MODE_B: render_mode_B,
}
if tilenum == None:
extra_columns_dict[COLUMN__TILED_OR_WHOLE] = 'whole'
« no previous file with comments | « gm/rebaseline_server/compare_configs_test.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