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

Side by Side Diff: src/pdf/SkPDFDevice.h

Issue 2227673002: std::move(SkTDArray) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-08-08 (Monday) 09:19:06 EDT Created 4 years, 4 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
« no previous file with comments | « src/core/SkAdvancedTypefaceMetrics.h ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPDFDevice_DEFINED 8 #ifndef SkPDFDevice_DEFINED
9 #define SkPDFDevice_DEFINED 9 #define SkPDFDevice_DEFINED
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override; 199 sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override;
200 sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override; 200 sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override;
201 sk_sp<SkSpecialImage> snapSpecial() override; 201 sk_sp<SkSpecialImage> snapSpecial() override;
202 202
203 private: 203 private:
204 struct RectWithData { 204 struct RectWithData {
205 SkRect rect; 205 SkRect rect;
206 sk_sp<SkData> data; 206 sk_sp<SkData> data;
207 RectWithData(const SkRect& rect, SkData* data) 207 RectWithData(const SkRect& rect, SkData* data)
208 : rect(rect), data(SkRef(data)) {} 208 : rect(rect), data(SkRef(data)) {}
209 RectWithData(RectWithData&& other) 209 RectWithData(RectWithData&&) = default;
210 : rect(other.rect), data(std::move(other.data)) {} 210 RectWithData& operator=(RectWithData&& other) = default;
211 RectWithData& operator=(RectWithData&& other) {
212 rect = other.rect;
213 data = std::move(other.data);
214 return *this;
215 }
216 }; 211 };
217 212
218 struct NamedDestination { 213 struct NamedDestination {
219 sk_sp<SkData> nameData; 214 sk_sp<SkData> nameData;
220 SkPoint point; 215 SkPoint point;
221 NamedDestination(SkData* nameData, const SkPoint& point) 216 NamedDestination(SkData* nameData, const SkPoint& point)
222 : nameData(SkRef(nameData)), point(point) {} 217 : nameData(SkRef(nameData)), point(point) {}
223 NamedDestination(NamedDestination&& other) 218 NamedDestination(NamedDestination&&) = default;
224 : nameData(std::move(other.nameData)), point(other.point) {} 219 NamedDestination& operator=(NamedDestination&&) = default;
225 NamedDestination& operator=(NamedDestination&& other) {
226 nameData = std::move(other.nameData);
227 point = other.point;
228 return *this;
229 }
230 }; 220 };
231 221
232 // TODO(vandebo): push most of SkPDFDevice's state into a core object in 222 // TODO(vandebo): push most of SkPDFDevice's state into a core object in
233 // order to get the right access levels without using friend. 223 // order to get the right access levels without using friend.
234 friend class ScopedContentEntry; 224 friend class ScopedContentEntry;
235 225
236 SkISize fPageSize; 226 SkISize fPageSize;
237 SkISize fContentSize; 227 SkISize fContentSize;
238 SkMatrix fInitialTransform; 228 SkMatrix fInitialTransform;
239 SkClipStack fExistingClipStack; 229 SkClipStack fExistingClipStack;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 310
321 typedef SkBaseDevice INHERITED; 311 typedef SkBaseDevice INHERITED;
322 312
323 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create 313 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
324 // an SkPDFDevice 314 // an SkPDFDevice
325 //friend class SkDocument_PDF; 315 //friend class SkDocument_PDF;
326 //friend class SkPDFImageShader; 316 //friend class SkPDFImageShader;
327 }; 317 };
328 318
329 #endif 319 #endif
OLDNEW
« no previous file with comments | « src/core/SkAdvancedTypefaceMetrics.h ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698