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

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (premultiplyAlpha) 158 if (premultiplyAlpha)
159 return StaticBitmapImage::create(skiaImage.release()); 159 return StaticBitmapImage::create(skiaImage.release());
160 return StaticBitmapImage::create(premulSkImageToUnPremul(skiaImage.get())); 160 return StaticBitmapImage::create(premulSkImageToUnPremul(skiaImage.get()));
161 } 161 }
162 162
163 ImageBitmap::ImageBitmap(HTMLImageElement* image, const IntRect& cropRect, Docum ent* document, const ImageBitmapOptions& options) 163 ImageBitmap::ImageBitmap(HTMLImageElement* image, const IntRect& cropRect, Docum ent* document, const ImageBitmapOptions& options)
164 { 164 {
165 bool flipY; 165 bool flipY;
166 parseOptions(options, flipY); 166 parseOptions(options, flipY);
167 167
168 m_image = cropImage(image->cachedImage()->image(), cropRect, flipY, m_isPrem ultiplied, PremultiplyAlpha); 168 m_image = cropImage(image->cachedImage()->getImage(), cropRect, flipY, m_isP remultiplied, PremultiplyAlpha);
169 if (!m_image) 169 if (!m_image)
170 return; 170 return;
171 m_image->setOriginClean(!image->wouldTaintOrigin(document->getSecurityOrigin ())); 171 m_image->setOriginClean(!image->wouldTaintOrigin(document->getSecurityOrigin ()));
172 } 172 }
173 173
174 ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect, Docum ent* document, const ImageBitmapOptions& options) 174 ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect, Docum ent* document, const ImageBitmapOptions& options)
175 { 175 {
176 IntSize playerSize; 176 IntSize playerSize;
177 if (video->webMediaPlayer()) 177 if (video->webMediaPlayer())
178 playerSize = video->webMediaPlayer()->naturalSize(); 178 playerSize = video->webMediaPlayer()->naturalSize();
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 FloatSize ImageBitmap::elementSize(const FloatSize&) const 446 FloatSize ImageBitmap::elementSize(const FloatSize&) 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/frame/ImageBitmapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698