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

Side by Side Diff: tools/PictureRenderer.cpp

Issue 428443002: Cleanup: Rename SkOSPath functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 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 | « tools/CopyTilesRenderer.cpp ('k') | tools/Resources.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 "PictureRenderer.h" 8 #include "PictureRenderer.h"
9 #include "picture_utils.h" 9 #include "picture_utils.h"
10 #include "SamplePipeControllers.h" 10 #include "SamplePipeControllers.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 SkAutoTDelete<SkBBHFactory> factory(this->getFactory()); 356 SkAutoTDelete<SkBBHFactory> factory(this->getFactory());
357 SkPictureRecorder recorder; 357 SkPictureRecorder recorder;
358 SkCanvas* canvas = recorder.beginRecording(this->getViewWidth(), this->getVi ewHeight(), 358 SkCanvas* canvas = recorder.beginRecording(this->getViewWidth(), this->getVi ewHeight(),
359 factory.get(), 359 factory.get(),
360 this->recordFlags()); 360 this->recordFlags());
361 this->scaleToScaleFactor(canvas); 361 this->scaleToScaleFactor(canvas);
362 fPicture->draw(canvas); 362 fPicture->draw(canvas);
363 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); 363 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
364 if (!fWritePath.isEmpty()) { 364 if (!fWritePath.isEmpty()) {
365 // Record the new picture as a new SKP with PNG encoded bitmaps. 365 // Record the new picture as a new SKP with PNG encoded bitmaps.
366 SkString skpPath = SkOSPath::SkPathJoin(fWritePath.c_str(), fInputFilena me.c_str()); 366 SkString skpPath = SkOSPath::Join(fWritePath.c_str(), fInputFilename.c_s tr());
367 SkFILEWStream stream(skpPath.c_str()); 367 SkFILEWStream stream(skpPath.c_str());
368 picture->serialize(&stream, &encode_bitmap_to_data); 368 picture->serialize(&stream, &encode_bitmap_to_data);
369 return true; 369 return true;
370 } 370 }
371 return false; 371 return false;
372 } 372 }
373 373
374 SkString RecordPictureRenderer::getConfigNameInternal() { 374 SkString RecordPictureRenderer::getConfigNameInternal() {
375 return SkString("record"); 375 return SkString("record");
376 } 376 }
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 virtual SkString getConfigNameInternal() SK_OVERRIDE { 758 virtual SkString getConfigNameInternal() SK_OVERRIDE {
759 return SkString("gather_pixelrefs"); 759 return SkString("gather_pixelrefs");
760 } 760 }
761 }; 761 };
762 762
763 PictureRenderer* CreateGatherPixelRefsRenderer() { 763 PictureRenderer* CreateGatherPixelRefsRenderer() {
764 return SkNEW(GatherRenderer); 764 return SkNEW(GatherRenderer);
765 } 765 }
766 766
767 } // namespace sk_tools 767 } // namespace sk_tools
OLDNEW
« no previous file with comments | « tools/CopyTilesRenderer.cpp ('k') | tools/Resources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698