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

Side by Side Diff: chrome/browser/themes/browser_theme_pack.h

Issue 10820049: Load 2x resources on demand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/icon_loader_win.cc ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ 5 #ifndef CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_
6 #define CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ 6 #define CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 // Creates the semi-transparent tab background images, putting the results 175 // Creates the semi-transparent tab background images, putting the results
176 // in |images|. Must be called after GenerateFrameImages(). 176 // in |images|. Must be called after GenerateFrameImages().
177 void CreateTabBackgroundImages(ImageCache* images) const; 177 void CreateTabBackgroundImages(ImageCache* images) const;
178 178
179 // Takes all the SkBitmaps in |images|, encodes them as PNGs and places 179 // Takes all the SkBitmaps in |images|, encodes them as PNGs and places
180 // them in |reencoded_images|. 180 // them in |reencoded_images|.
181 void RepackImages(const ImageCache& images, 181 void RepackImages(const ImageCache& images,
182 RawImages* reencoded_images) const; 182 RawImages* reencoded_images) const;
183 183
184 // Generates image reps for |scale_factors| for
185 // |prepared_images_on_ui_thread_| and |prepared_images_on_file_thread_|.
186 void GenerateImageReps(const std::vector<ui::ScaleFactor>& scale_factors);
187
188 // Takes all images in |source| and puts them in |destination|, freeing any 184 // Takes all images in |source| and puts them in |destination|, freeing any
189 // image already in |destination| that |source| would overwrite. 185 // image already in |destination| that |source| would overwrite.
190 void MergeImageCaches(const ImageCache& source, 186 void MergeImageCaches(const ImageCache& source,
191 ImageCache* destination) const; 187 ImageCache* destination) const;
192 188
193 // Copies images from |source| to |destination| such that the lifetimes of 189 // Copies images from |source| to |destination| such that the lifetimes of
194 // the images in |destination| are not affected by the lifetimes of the 190 // the images in |destination| are not affected by the lifetimes of the
195 // images in |source|. 191 // images in |source|.
196 void CopyImagesTo(const ImageCache& source, ImageCache* destination) const; 192 void CopyImagesTo(const ImageCache& source, ImageCache* destination) const;
197 193
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Cache of images created in BuildFromExtension(). Once the theme pack is 263 // Cache of images created in BuildFromExtension(). Once the theme pack is
268 // created, this cache should only be accessed on the file thread. There 264 // created, this cache should only be accessed on the file thread. There
269 // should be no IDs in |image_memory_| that are in |images_on_file_thread_| 265 // should be no IDs in |image_memory_| that are in |images_on_file_thread_|
270 // or vice versa. 266 // or vice versa.
271 ImageCache images_on_file_thread_; 267 ImageCache images_on_file_thread_;
272 268
273 DISALLOW_COPY_AND_ASSIGN(BrowserThemePack); 269 DISALLOW_COPY_AND_ASSIGN(BrowserThemePack);
274 }; 270 };
275 271
276 #endif // CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ 272 #endif // CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_
OLDNEW
« no previous file with comments | « chrome/browser/icon_loader_win.cc ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698