Lines Matching defs:Image

169 // An ImageRep is the object that holds the backing memory for an Image. Each
176 explicit ImageRep(Image::RepresentationType rep) : type_(rep) {}
183 CHECK_EQ(type_, Image::kImageRepPNG);
188 CHECK_EQ(type_, Image::kImageRepSkia);
194 CHECK_EQ(type_, Image::kImageRepCocoaTouch);
199 CHECK_EQ(type_, Image::kImageRepCocoa);
204 Image::RepresentationType type() const { return type_; }
211 Image::RepresentationType type_;
216 ImageRepPNG() : ImageRep(Image::kImageRepPNG) {
220 : ImageRep(Image::kImageRepPNG),
266 : ImageRep(Image::kImageRepSkia),
297 : ImageRep(Image::kImageRepCocoaTouch),
330 : ImageRep(Image::kImageRepCocoa),
361 // The Storage class acts similarly to the pixels in a SkBitmap: the Image
363 // ImageReps. This way, the Image can be cheaply copied.
366 ImageStorage(Image::RepresentationType default_type)
375 Image::RepresentationType default_representation_type() {
378 Image::RepresentationMap& representations() { return representations_; }
396 Image::RepresentationType default_representation_type_;
406 // All the representations of an Image. Size will always be at least one, with
408 Image::RepresentationMap representations_;
410 STLValueDeleter<Image::RepresentationMap> representations_deleter_;
417 Image::Image() {
421 Image::Image(const std::vector<ImagePNGRep>& image_reps) {
432 storage_ = new internal::ImageStorage(Image::kImageRepPNG);
437 Image::Image(const ImageSkia& image) {
439 storage_ = new internal::ImageStorage(Image::kImageRepSkia);
447 Image::Image(UIImage* image)
448 : storage_(new internal::ImageStorage(Image::kImageRepCocoaTouch)) {
455 Image::Image(NSImage* image) {
457 storage_ = new internal::ImageStorage(Image::kImageRepCocoa);
464 Image::Image(const Image& other) : storage_(other.storage_) {
467 Image& Image::operator=(const Image& other) {
472 Image::~Image() {
476 Image Image::CreateFrom1xBitmap(const SkBitmap& bitmap) {
477 return Image(ImageSkia::CreateFrom1xBitmap(bitmap));
481 Image Image::CreateFrom1xPNGBytes(const unsigned char* input,
484 return Image();
492 Image Image::CreateFrom1xPNGBytes(
495 return Image();
499 return Image(image_reps);
502 const SkBitmap* Image::ToSkBitmap() const {
507 const ImageSkia* Image::ToImageSkia() const {
546 UIImage* Image::ToUIImage() const {
574 NSImage* Image::ToNSImage() const {
607 scoped_refptr<base::RefCountedMemory> Image::As1xPNGBytes() const {
671 SkBitmap Image::AsBitmap() const {
675 ImageSkia Image::AsImageSkia() const {
680 NSImage* Image::AsNSImage() const {
685 scoped_refptr<base::RefCountedMemory> Image::Copy1xPNGBytes() const {
692 ImageSkia* Image::CopyImageSkia() const {
696 SkBitmap* Image::CopySkBitmap() const {
701 UIImage* Image::CopyUIImage() const {
707 NSImage* Image::CopyNSImage() const {
714 bool Image::HasRepresentation(RepresentationType type) const {
718 size_t Image::RepresentationCount() const {
725 bool Image::IsEmpty() const {
729 int Image::Width() const {
735 int Image::Height() const {
741 gfx::Size Image::Size() const {
747 void Image::SwapRepresentations(Image* other) {
752 void Image::SetSourceColorSpace(CGColorSpaceRef color_space) {
758 Image::RepresentationType Image::DefaultRepresentationType() const {
763 internal::ImageRep* Image::GetRepresentation(
774 void Image::AddRepresentation(internal::ImageRep* rep) const {