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

Side by Side Diff: src/core/SkPictureImageGenerator.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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/SkMultiPictureDraw.cpp ('k') | src/core/SkPictureShader.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 2015 Google Inc. 2 * Copyright 2015 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 "SkImageGenerator.h" 8 #include "SkImageGenerator.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 SkMatrix matrix = fMatrix; 105 SkMatrix matrix = fMatrix;
106 if (subset) { 106 if (subset) {
107 matrix.postTranslate(-subset->x(), -subset->y()); 107 matrix.postTranslate(-subset->x(), -subset->y());
108 } 108 }
109 surface->getCanvas()->clear(0); // does NewRenderTarget promise to do this f or us? 109 surface->getCanvas()->clear(0); // does NewRenderTarget promise to do this f or us?
110 surface->getCanvas()->drawPicture(fPicture, &matrix, fPaint.getMaybeNull()); 110 surface->getCanvas()->drawPicture(fPicture, &matrix, fPaint.getMaybeNull());
111 SkAutoTUnref<SkImage> image(surface->newImageSnapshot()); 111 SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
112 if (!image.get()) { 112 if (!image.get()) {
113 return nullptr; 113 return nullptr;
114 } 114 }
115
116 image->getTexture()->fException2 = true;
117
115 return SkSafeRef(image->getTexture()); 118 return SkSafeRef(image->getTexture());
116 } 119 }
117 #endif 120 #endif
OLDNEW
« no previous file with comments | « src/core/SkMultiPictureDraw.cpp ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698