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

Side by Side Diff: src/gpu/gl/GrGLPath.cpp

Issue 1187523005: Add support for creating texture backed images where Skia will delete the texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add default param to support Chrome's current callers Created 5 years, 6 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/gpu/gl/GrGLInterface.cpp ('k') | src/gpu/gl/GrGLPathRange.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrGLPath.h" 9 #include "GrGLPath.h"
10 #include "GrGLPathRendering.h" 10 #include "GrGLPathRendering.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 if (fShouldStroke) { 208 if (fShouldStroke) {
209 // FIXME: try to account for stroking, without rasterizing the stroke. 209 // FIXME: try to account for stroking, without rasterizing the stroke.
210 fBounds.outset(stroke->getWidth(), stroke->getWidth()); 210 fBounds.outset(stroke->getWidth(), stroke->getWidth());
211 } 211 }
212 212
213 this->registerWithCache(); 213 this->registerWithCache();
214 } 214 }
215 215
216 void GrGLPath::onRelease() { 216 void GrGLPath::onRelease() {
217 if (0 != fPathID && !this->isWrapped()) { 217 if (0 != fPathID && this->shouldFreeResources()) {
218 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1); 218 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1);
219 fPathID = 0; 219 fPathID = 0;
220 } 220 }
221 221
222 INHERITED::onRelease(); 222 INHERITED::onRelease();
223 } 223 }
224 224
225 void GrGLPath::onAbandon() { 225 void GrGLPath::onAbandon() {
226 fPathID = 0; 226 fPathID = 0;
227 227
228 INHERITED::onAbandon(); 228 INHERITED::onAbandon();
229 } 229 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLInterface.cpp ('k') | src/gpu/gl/GrGLPathRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698