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

Side by Side Diff: tools/CopyTilesRenderer.cpp

Issue 377623002: Split SkPicturePlayback out of SkPictureData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add virtual dtor for SkPicturePlayback Created 6 years, 5 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 | « tools/CopyTilesRenderer.h ('k') | tools/PictureRenderer.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 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"
11 #include "SkDevice.h" 11 #include "SkDevice.h"
12 #include "SkImageEncoder.h" 12 #include "SkImageEncoder.h"
13 #include "SkPicture.h" 13 #include "SkPicture.h"
14 #include "SkPixelRef.h" 14 #include "SkPixelRef.h"
15 #include "SkRect.h" 15 #include "SkRect.h"
16 #include "SkString.h" 16 #include "SkString.h"
17 17
18 namespace sk_tools { 18 namespace sk_tools {
19 CopyTilesRenderer::CopyTilesRenderer(int x, int y) 19 CopyTilesRenderer::CopyTilesRenderer(int x, int y)
20 : fXTilesPerLargeTile(x) 20 : fXTilesPerLargeTile(x)
21 , fYTilesPerLargeTile(y) { 21 , fYTilesPerLargeTile(y) {
22 } 22 }
23 void CopyTilesRenderer::init(SkPicture* pict, const SkString* writePath, 23 void CopyTilesRenderer::init(const SkPicture* pict, const SkString* writePat h,
24 const SkString* mismatchPath, const SkString* i nputFilename, 24 const SkString* mismatchPath, const SkString* i nputFilename,
25 bool useChecksumBasedFilenames) { 25 bool useChecksumBasedFilenames) {
26 // Do not call INHERITED::init(), which would create a (potentially larg e) canvas which is 26 // Do not call INHERITED::init(), which would create a (potentially larg e) canvas which is
27 // not used by bench_pictures. 27 // not used by bench_pictures.
28 SkASSERT(pict != NULL); 28 SkASSERT(pict != NULL);
29 // Only work with absolute widths (as opposed to percentages). 29 // Only work with absolute widths (as opposed to percentages).
30 SkASSERT(this->getTileWidth() != 0 && this->getTileHeight() != 0); 30 SkASSERT(this->getTileWidth() != 0 && this->getTileHeight() != 0);
31 fPicture.reset(pict)->ref(); 31 fPicture.reset(pict)->ref();
32 this->CopyString(&fWritePath, writePath); 32 this->CopyString(&fWritePath, writePath);
33 this->CopyString(&fMismatchPath, mismatchPath); 33 this->CopyString(&fMismatchPath, mismatchPath);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 } 94 }
95 } 95 }
96 return success; 96 return success;
97 } 97 }
98 98
99 SkString CopyTilesRenderer::getConfigNameInternal() { 99 SkString CopyTilesRenderer::getConfigNameInternal() {
100 return SkString("copy_tiles"); 100 return SkString("copy_tiles");
101 } 101 }
102 } 102 }
OLDNEW
« no previous file with comments | « tools/CopyTilesRenderer.h ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698