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

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: 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..16415c9a78fabd3d183a2773d7c1dfd7670212e5 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'
epoger 2014/08/18 19:56:31 Interesting. One thing that's potentially tricky:
stephana 2014/08/18 20:24:53 IMO, if we are comparing output from two builders
epoger 2014/08/18 20:34:49 SGTM.
+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,13 @@ class RenderedPicturesComparisons(results.BaseComparisons):
self._validate_dict_version(dictB)
dictB_results = self.get_default(dictB, {}, setB_section)
+ get2 = lambda dic, k: None if not dic else \
epoger 2014/08/18 19:56:32 I think this provides a subset of functionality th
stephana 2014/08/18 20:24:53 Done.
+ (dic.get(gm_json.JSONKEY_DESCRIPTIONS, {}) or {}).get(k, None)
+ builder_A = get2(dictA, gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
+ render_mode_A = get2(dictA, gm_json.JSONKEY_DESCRIPTIONS_RENDER_MODE)
+ builder_B = get2(dictB, gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
+ render_mode_B = get2(dictB, 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 +293,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 +313,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,7 +360,10 @@ 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.
@@ -382,6 +405,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'

Powered by Google App Engine
This is Rietveld 408576698