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

Side by Side Diff: ui/file_manager/gallery/js/image_editor/image_view.js

Issue 2629133002: Avoid UI unresponsiveness when switching between large images. (Closed)
Patch Set: Remove @private from the constant to be consistent with others. Created 3 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 unified diff | Download patch
« no previous file with comments | « ui/file_manager/gallery/js/gallery_item.js ('k') | 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * The overlay displaying the image. 6 * The overlay displaying the image.
7 * 7 *
8 * @param {!HTMLElement} container The container element. 8 * @param {!HTMLElement} container The container element.
9 * @param {!Viewport} viewport The viewport. 9 * @param {!Viewport} viewport The viewport.
10 * @param {!MetadataModel} metadataModel 10 * @param {!MetadataModel} metadataModel
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 }; 131 };
132 132
133 /** 133 /**
134 * Obtains prefered load type from GalleryItem. 134 * Obtains prefered load type from GalleryItem.
135 * 135 *
136 * @param {!GalleryItem} item 136 * @param {!GalleryItem} item
137 * @param {!ImageView.Effect} effect 137 * @param {!ImageView.Effect} effect
138 * @return {ImageView.LoadTarget} Load target. 138 * @return {ImageView.LoadTarget} Load target.
139 */ 139 */
140 ImageView.getLoadTarget = function(item, effect) { 140 ImageView.getLoadTarget = function(item, effect) {
141 if (item.contentImage) 141 if (item.contentImage && !item.requireLongRenderingTime())
142 return ImageView.LoadTarget.CACHED_MAIN_IMAGE; 142 return ImageView.LoadTarget.CACHED_MAIN_IMAGE;
143 143
144 // Only show thumbnails if there is no effect or the effect is Slide or 144 // Only show thumbnails if there is no effect or the effect is Slide or
145 // ZoomToScreen. 145 // ZoomToScreen.
146 var thumbnailLoader = new ThumbnailLoader( 146 var thumbnailLoader = new ThumbnailLoader(
147 item.getEntry(), 147 item.getEntry(),
148 ThumbnailLoader.LoaderType.CANVAS, 148 ThumbnailLoader.LoaderType.CANVAS,
149 item.getThumbnailMetadataItem()); 149 item.getThumbnailMetadataItem());
150 if ((effect instanceof ImageView.Effect.None || 150 if ((effect instanceof ImageView.Effect.None ||
151 effect instanceof ImageView.Effect.Slide || 151 effect instanceof ImageView.Effect.Slide ||
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 966
967 ImageView.Effect.Rotate.prototype = { __proto__: ImageView.Effect.prototype }; 967 ImageView.Effect.Rotate.prototype = { __proto__: ImageView.Effect.prototype };
968 968
969 /** 969 /**
970 * @override 970 * @override
971 */ 971 */
972 ImageView.Effect.Rotate.prototype.transform = function(element, viewport) { 972 ImageView.Effect.Rotate.prototype.transform = function(element, viewport) {
973 return viewport.getRotatingTransformation( 973 return viewport.getRotatingTransformation(
974 element.width, element.height, this.orientation_ ? -1 : 1); 974 element.width, element.height, this.orientation_ ? -1 : 1);
975 }; 975 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/gallery_item.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698