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

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

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased Created 4 years, 3 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/graphics/skia/SkiaUtils.h" 10 #include "platform/graphics/skia/SkiaUtils.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 return new ImageBitmap(data, cropRect, options); 617 return new ImageBitmap(data, cropRect, options);
618 } 618 }
619 619
620 ImageBitmap* ImageBitmap::create(ImageBitmap* bitmap, Optional<IntRect> cropRect , const ImageBitmapOptions& options) 620 ImageBitmap* ImageBitmap::create(ImageBitmap* bitmap, Optional<IntRect> cropRect , const ImageBitmapOptions& options)
621 { 621 {
622 return new ImageBitmap(bitmap, cropRect, options); 622 return new ImageBitmap(bitmap, cropRect, options);
623 } 623 }
624 624
625 ImageBitmap* ImageBitmap::create(PassRefPtr<StaticBitmapImage> image, Optional<I ntRect> cropRect, const ImageBitmapOptions& options) 625 ImageBitmap* ImageBitmap::create(PassRefPtr<StaticBitmapImage> image, Optional<I ntRect> cropRect, const ImageBitmapOptions& options)
626 { 626 {
627 return new ImageBitmap(image, cropRect, options); 627 return new ImageBitmap(std::move(image), cropRect, options);
628 } 628 }
629 629
630 ImageBitmap* ImageBitmap::create(PassRefPtr<StaticBitmapImage> image) 630 ImageBitmap* ImageBitmap::create(PassRefPtr<StaticBitmapImage> image)
631 { 631 {
632 return new ImageBitmap(image); 632 return new ImageBitmap(std::move(image));
633 } 633 }
634 634
635 ImageBitmap* ImageBitmap::create(std::unique_ptr<uint8_t[]> data, uint32_t width , uint32_t height, bool isImageBitmapPremultiplied, bool isImageBitmapOriginClea n) 635 ImageBitmap* ImageBitmap::create(std::unique_ptr<uint8_t[]> data, uint32_t width , uint32_t height, bool isImageBitmapPremultiplied, bool isImageBitmapOriginClea n)
636 { 636 {
637 return new ImageBitmap(std::move(data), width, height, isImageBitmapPremulti plied, isImageBitmapOriginClean); 637 return new ImageBitmap(std::move(data), width, height, isImageBitmapPremulti plied, isImageBitmapOriginClean);
638 } 638 }
639 639
640 void ImageBitmap::close() 640 void ImageBitmap::close()
641 { 641 {
642 if (!m_image || m_isNeutered) 642 if (!m_image || m_isNeutered)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 FloatSize ImageBitmap::elementSize(const FloatSize&) const 710 FloatSize ImageBitmap::elementSize(const FloatSize&) const
711 { 711 {
712 return FloatSize(width(), height()); 712 return FloatSize(width(), height());
713 } 713 }
714 714
715 DEFINE_TRACE(ImageBitmap) 715 DEFINE_TRACE(ImageBitmap)
716 { 716 {
717 } 717 }
718 718
719 } // namespace blink 719 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/History.cpp ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698