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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Pattern.cpp

Issue 2306293002: Replaced PassRefPtr copies with moves in Source/platform. (Closed)
Patch Set: 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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
4 * Copyright (C) 2013 Google, Inc. All rights reserved. 4 * Copyright (C) 2013 Google, Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 21 matching lines...) Expand all
32 #include "platform/graphics/skia/SkiaUtils.h" 32 #include "platform/graphics/skia/SkiaUtils.h"
33 #include "third_party/skia/include/core/SkImage.h" 33 #include "third_party/skia/include/core/SkImage.h"
34 #include "third_party/skia/include/core/SkPicture.h" 34 #include "third_party/skia/include/core/SkPicture.h"
35 #include "third_party/skia/include/core/SkShader.h" 35 #include "third_party/skia/include/core/SkShader.h"
36 #include <v8.h> 36 #include <v8.h>
37 37
38 namespace blink { 38 namespace blink {
39 39
40 PassRefPtr<Pattern> Pattern::createImagePattern(PassRefPtr<Image> tileImage, Rep eatMode repeatMode) 40 PassRefPtr<Pattern> Pattern::createImagePattern(PassRefPtr<Image> tileImage, Rep eatMode repeatMode)
41 { 41 {
42 return ImagePattern::create(tileImage, repeatMode); 42 return ImagePattern::create(std::move(tileImage), repeatMode);
43 } 43 }
44 44
45 PassRefPtr<Pattern> Pattern::createPicturePattern(sk_sp<SkPicture> picture, 45 PassRefPtr<Pattern> Pattern::createPicturePattern(sk_sp<SkPicture> picture,
46 RepeatMode repeatMode) 46 RepeatMode repeatMode)
47 { 47 {
48 return PicturePattern::create(std::move(picture), repeatMode); 48 return PicturePattern::create(std::move(picture), repeatMode);
49 } 49 }
50 50
51 Pattern::Pattern(RepeatMode repeatMode, int64_t externalMemoryAllocated) 51 Pattern::Pattern(RepeatMode repeatMode, int64_t externalMemoryAllocated)
52 : m_repeatMode(repeatMode) 52 : m_repeatMode(repeatMode)
(...skipping 23 matching lines...) Expand all
76 void Pattern::adjustExternalMemoryAllocated(int64_t delta) 76 void Pattern::adjustExternalMemoryAllocated(int64_t delta)
77 { 77 {
78 delta = std::max(-m_externalMemoryAllocated, delta); 78 delta = std::max(-m_externalMemoryAllocated, delta);
79 79
80 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(delta); 80 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(delta);
81 81
82 m_externalMemoryAllocated += delta; 82 m_externalMemoryAllocated += delta;
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698