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

Side by Side Diff: ui/gfx/image/image_skia.h

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 years, 2 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 | « ui/gfx/image/image_png_rep.h ('k') | ui/gfx/image/image_skia_operations.h » ('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 UI_GFX_IMAGE_IMAGE_SKIA_H_ 5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_H_
6 #define UI_GFX_IMAGE_IMAGE_SKIA_H_ 6 #define UI_GFX_IMAGE_IMAGE_SKIA_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 // Container for the same image at different densities, similar to NSImage. 29 // Container for the same image at different densities, similar to NSImage.
30 // Image height and width are in DIP (Density Indepent Pixel) coordinates. 30 // Image height and width are in DIP (Density Indepent Pixel) coordinates.
31 // 31 //
32 // ImageSkia should be used whenever possible instead of SkBitmap. 32 // ImageSkia should be used whenever possible instead of SkBitmap.
33 // Functions that mutate the image should operate on the gfx::ImageSkiaRep 33 // Functions that mutate the image should operate on the gfx::ImageSkiaRep
34 // returned from ImageSkia::GetRepresentation, not on ImageSkia. 34 // returned from ImageSkia::GetRepresentation, not on ImageSkia.
35 // 35 //
36 // ImageSkia is cheap to copy and intentionally supports copy semantics. 36 // ImageSkia is cheap to copy and intentionally supports copy semantics.
37 class UI_EXPORT ImageSkia { 37 class GFX_EXPORT ImageSkia {
38 public: 38 public:
39 typedef std::vector<ImageSkiaRep> ImageSkiaReps; 39 typedef std::vector<ImageSkiaRep> ImageSkiaReps;
40 40
41 // Creates an instance with no bitmaps. 41 // Creates an instance with no bitmaps.
42 ImageSkia(); 42 ImageSkia();
43 43
44 // Creates an instance that will use the |source| to get the image 44 // Creates an instance that will use the |source| to get the image
45 // for scale factors. |size| specifes the size of the image in DIP. 45 // for scale factors. |size| specifes the size of the image in DIP.
46 // ImageSkia owns |source|. 46 // ImageSkia owns |source|.
47 ImageSkia(ImageSkiaSource* source, const gfx::Size& size); 47 ImageSkia(ImageSkiaSource* source, const gfx::Size& size);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // so that other thread can access the storage. 166 // so that other thread can access the storage.
167 void DetachStorageFromThread(); 167 void DetachStorageFromThread();
168 168
169 // A refptr so that ImageRepSkia can be copied cheaply. 169 // A refptr so that ImageRepSkia can be copied cheaply.
170 scoped_refptr<internal::ImageSkiaStorage> storage_; 170 scoped_refptr<internal::ImageSkiaStorage> storage_;
171 }; 171 };
172 172
173 } // namespace gfx 173 } // namespace gfx
174 174
175 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_ 175 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_
OLDNEW
« no previous file with comments | « ui/gfx/image/image_png_rep.h ('k') | ui/gfx/image/image_skia_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698