OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |