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

Side by Side Diff: tools/CopyTilesRenderer.cpp

Issue 1370803002: Base SkAutoTUnref on skstd::unique_ptr. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 5 years, 2 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 | « tests/FontHostStreamTest.cpp ('k') | tools/PictureRenderer.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 #include "picture_utils.h" 8 #include "picture_utils.h"
9 #include "CopyTilesRenderer.h" 9 #include "CopyTilesRenderer.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 17 matching lines...) Expand all
28 , fYTilesPerLargeTile(y) { } 28 , fYTilesPerLargeTile(y) { }
29 #endif 29 #endif
30 void CopyTilesRenderer::init(const SkPicture* pict, const SkString* writePat h, 30 void CopyTilesRenderer::init(const SkPicture* pict, const SkString* writePat h,
31 const SkString* mismatchPath, const SkString* i nputFilename, 31 const SkString* mismatchPath, const SkString* i nputFilename,
32 bool useChecksumBasedFilenames, bool useMultiPi ctureDraw) { 32 bool useChecksumBasedFilenames, bool useMultiPi ctureDraw) {
33 // Do not call INHERITED::init(), which would create a (potentially larg e) canvas which is 33 // Do not call INHERITED::init(), which would create a (potentially larg e) canvas which is
34 // not used by bench_pictures. 34 // not used by bench_pictures.
35 SkASSERT(pict != nullptr); 35 SkASSERT(pict != nullptr);
36 // Only work with absolute widths (as opposed to percentages). 36 // Only work with absolute widths (as opposed to percentages).
37 SkASSERT(this->getTileWidth() != 0 && this->getTileHeight() != 0); 37 SkASSERT(this->getTileWidth() != 0 && this->getTileHeight() != 0);
38 fPicture.reset(pict)->ref(); 38 fPicture.reset(SkRef(pict));
39 this->CopyString(&fWritePath, writePath); 39 this->CopyString(&fWritePath, writePath);
40 this->CopyString(&fMismatchPath, mismatchPath); 40 this->CopyString(&fMismatchPath, mismatchPath);
41 this->CopyString(&fInputFilename, inputFilename); 41 this->CopyString(&fInputFilename, inputFilename);
42 fUseChecksumBasedFilenames = useChecksumBasedFilenames; 42 fUseChecksumBasedFilenames = useChecksumBasedFilenames;
43 fUseMultiPictureDraw = useMultiPictureDraw; 43 fUseMultiPictureDraw = useMultiPictureDraw;
44 this->buildBBoxHierarchy(); 44 this->buildBBoxHierarchy();
45 // In order to avoid allocating a large canvas (particularly important f or GPU), create one 45 // In order to avoid allocating a large canvas (particularly important f or GPU), create one
46 // canvas that is a multiple of the tile size, and draw portions of the picture. 46 // canvas that is a multiple of the tile size, and draw portions of the picture.
47 fLargeTileWidth = fXTilesPerLargeTile * this->getTileWidth(); 47 fLargeTileWidth = fXTilesPerLargeTile * this->getTileWidth();
48 fLargeTileHeight = fYTilesPerLargeTile * this->getTileHeight(); 48 fLargeTileHeight = fYTilesPerLargeTile * this->getTileHeight();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 } 110 }
111 } 111 }
112 return success; 112 return success;
113 } 113 }
114 114
115 SkString CopyTilesRenderer::getConfigNameInternal() { 115 SkString CopyTilesRenderer::getConfigNameInternal() {
116 return SkString("copy_tiles"); 116 return SkString("copy_tiles");
117 } 117 }
118 } 118 }
OLDNEW
« no previous file with comments | « tests/FontHostStreamTest.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698