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

Side by Side Diff: third_party/WebKit/Source/core/frame/ImageBitmap.cpp

Issue 1746283002: Rename enums/functions that collide in chromium style in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-13-platform: . Created 4 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "core/frame/ImageBitmap.h" 5 #include "core/frame/ImageBitmap.h"
6 6
7 #include "core/html/HTMLCanvasElement.h" 7 #include "core/html/HTMLCanvasElement.h"
8 #include "core/html/HTMLVideoElement.h" 8 #include "core/html/HTMLVideoElement.h"
9 #include "core/html/ImageData.h" 9 #include "core/html/ImageData.h"
10 #include "platform/image-decoders/ImageDecoder.h" 10 #include "platform/image-decoders/ImageDecoder.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 SkImageInfo info = SkImageInfo::Make(input->width(), input->height(), kN32_S kColorType, kUnpremul_SkAlphaType); 87 SkImageInfo info = SkImageInfo::Make(input->width(), input->height(), kN32_S kColorType, kUnpremul_SkAlphaType);
88 OwnPtr<uint8_t[]> dstPixels = copySkImageData(input, info); 88 OwnPtr<uint8_t[]> dstPixels = copySkImageData(input, info);
89 return newSkImageFromRaster(info, dstPixels.release(), input->width() * info .bytesPerPixel()); 89 return newSkImageFromRaster(info, dstPixels.release(), input->width() * info .bytesPerPixel());
90 } 90 }
91 91
92 PassRefPtr<SkImage> ImageBitmap::getSkImageFromDecoder(PassOwnPtr<ImageDecoder> decoder) 92 PassRefPtr<SkImage> ImageBitmap::getSkImageFromDecoder(PassOwnPtr<ImageDecoder> decoder)
93 { 93 {
94 if (!decoder->frameCount()) 94 if (!decoder->frameCount())
95 return nullptr; 95 return nullptr;
96 ImageFrame* frame = decoder->frameBufferAtIndex(0); 96 ImageFrame* frame = decoder->frameBufferAtIndex(0);
97 if (!frame || frame->status() != ImageFrame::FrameComplete) 97 if (!frame || frame->getStatus() != ImageFrame::FrameComplete)
98 return nullptr; 98 return nullptr;
99 SkBitmap bitmap = frame->bitmap(); 99 SkBitmap bitmap = frame->bitmap();
100 if (!frameIsValid(bitmap)) 100 if (!frameIsValid(bitmap))
101 return nullptr; 101 return nullptr;
102 return adoptRef(SkImage::NewFromBitmap(bitmap)); 102 return adoptRef(SkImage::NewFromBitmap(bitmap));
103 } 103 }
104 104
105 static PassRefPtr<StaticBitmapImage> cropImage(Image* image, const IntRect& crop Rect, bool flipY, bool premultiplyAlpha, bool isBitmapPremultiplied = true) 105 static PassRefPtr<StaticBitmapImage> cropImage(Image* image, const IntRect& crop Rect, bool flipY, bool premultiplyAlpha, bool isBitmapPremultiplied = true)
106 { 106 {
107 ASSERT(image); 107 ASSERT(image);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 FloatSize ImageBitmap::elementSize() const 446 FloatSize ImageBitmap::elementSize() const
447 { 447 {
448 return FloatSize(width(), height()); 448 return FloatSize(width(), height());
449 } 449 }
450 450
451 DEFINE_TRACE(ImageBitmap) 451 DEFINE_TRACE(ImageBitmap)
452 { 452 {
453 } 453 }
454 454
455 } // namespace blink 455 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698