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

Unified Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 1608143002: support animated GIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add assert to pass closure compiler Created 4 years, 11 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: ui/file_manager/gallery/js/slide_mode.js
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js
index f2ed0206f5e928b17cd7619ab707beb4613be9b3..a550d201a91c9d1e8fe7717b7eca3cc60db54a11 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -1041,9 +1041,9 @@ SlideMode.prototype.itemLoaded_ = function(
toMillions(metadata.size));
}
- var canvas = this.imageView_.getCanvas();
+ var image = this.imageView_.getImage();
ImageUtil.metrics.recordSmallCount(ImageUtil.getMetricName('Size.MPix'),
- toMillions(canvas.width * canvas.height));
+ toMillions(image.width * image.height));
var extIndex = entry.name.lastIndexOf('.');
var ext = extIndex < 0 ? '' :
@@ -1299,7 +1299,7 @@ SlideMode.prototype.saveCurrentImage_ = function(item, callback) {
var savedPromise = this.dataModel_.saveItem(
this.volumeManager_,
item,
- this.imageView_.getCanvas(),
+ ImageUtil.ensureCanvas(this.imageView_.getImage()),
this.overwriteOriginalCheckbox_.checked);
savedPromise.then(function() {
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | ui/file_manager/integration_tests/gallery/open_image_files.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698