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

Side by Side Diff: tools/skp/webpages_playback.py

Issue 1662693002: Recreate SKPs in a single directory for trusted partners (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Fix Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Archives or replays webpages and creates SKPs in a Google Storage location. 6 """Archives or replays webpages and creates SKPs in a Google Storage location.
7 7
8 To archive webpages and store SKP files (archives should be rarely updated): 8 To archive webpages and store SKP files (archives should be rarely updated):
9 9
10 cd skia 10 cd skia
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % ( 370 print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % (
371 posixpath.join(self.gs.target_name(), dest_dir_name, 371 posixpath.join(self.gs.target_name(), dest_dir_name,
372 SKPICTURES_DIR_NAME)) 372 SKPICTURES_DIR_NAME))
373 373
374 if self._upload_to_partner_bucket: 374 if self._upload_to_partner_bucket:
375 print '\n\n=======Uploading to Partner bucket %s =======\n\n' % ( 375 print '\n\n=======Uploading to Partner bucket %s =======\n\n' % (
376 PARTNERS_GS_BUCKET) 376 PARTNERS_GS_BUCKET)
377 partner_gs = GoogleStorageDataStore(PARTNERS_GS_BUCKET) 377 partner_gs = GoogleStorageDataStore(PARTNERS_GS_BUCKET)
378 partner_gs.upload_dir_contents( 378 partner_gs.upload_dir_contents(
379 os.path.join(LOCAL_PLAYBACK_ROOT_DIR, SKPICTURES_DIR_NAME), 379 os.path.join(LOCAL_PLAYBACK_ROOT_DIR, SKPICTURES_DIR_NAME),
380 dest_dir=posixpath.join(SKPICTURES_DIR_NAME, dest_dir_name), 380 dest_dir=SKPICTURES_DIR_NAME,
381 upload_if=gs_utils.GSUtils.UploadIf.IF_MODIFIED) 381 upload_if=gs_utils.GSUtils.UploadIf.IF_MODIFIED)
382 print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % ( 382 print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % (
383 posixpath.join(partner_gs.target_name(), SKPICTURES_DIR_NAME, 383 posixpath.join(partner_gs.target_name(), SKPICTURES_DIR_NAME))
384 dest_dir_name))
385 else: 384 else:
386 print '\n\n=======Not Uploading to %s=======\n\n' % self.gs.target_type() 385 print '\n\n=======Not Uploading to %s=======\n\n' % self.gs.target_type()
387 print 'Generated resources are available in %s\n\n' % ( 386 print 'Generated resources are available in %s\n\n' % (
388 LOCAL_PLAYBACK_ROOT_DIR) 387 LOCAL_PLAYBACK_ROOT_DIR)
389 388
390 return 0 389 return 0
391 390
392 def _GetSkiaSkpFileName(self, page_set): 391 def _GetSkiaSkpFileName(self, page_set):
393 """Returns the SKP file name for Skia page sets.""" 392 """Returns the SKP file name for Skia page sets."""
394 # /path/to/skia_yahooanswers_desktop.py -> skia_yahooanswers_desktop.py 393 # /path/to/skia_yahooanswers_desktop.py -> skia_yahooanswers_desktop.py
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 '--skia_tools is specified then the debugger is not run.', 585 '--skia_tools is specified then the debugger is not run.',
587 default=False) 586 default=False)
588 option_parser.add_option( 587 option_parser.add_option(
589 '', '--skp_prefix', 588 '', '--skp_prefix',
590 help='Prefix to add to the names of generated SKPs.', 589 help='Prefix to add to the names of generated SKPs.',
591 default=None) 590 default=None)
592 options, unused_args = option_parser.parse_args() 591 options, unused_args = option_parser.parse_args()
593 592
594 playback = SkPicturePlayback(options) 593 playback = SkPicturePlayback(options)
595 sys.exit(playback.Run()) 594 sys.exit(playback.Run())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698