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

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

Issue 729683002: Make GrResourceCache2 responsible for calling release, abandon, and ~. (Closed) Base URL: https://skia.googlesource.com/skia.git@revrev
Patch Set: tiny cleanup Created 6 years, 1 month 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/GrGLPath.h ('k') | src/gpu/gl/GrGLPathRange.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 /* 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 InitPathObject(gpu, fPathID, fSkPath, stroke); 137 InitPathObject(gpu, fPathID, fSkPath, stroke);
138 138
139 if (stroke.needToApply()) { 139 if (stroke.needToApply()) {
140 // FIXME: try to account for stroking, without rasterizing the stroke. 140 // FIXME: try to account for stroking, without rasterizing the stroke.
141 fBounds.outset(stroke.getWidth(), stroke.getWidth()); 141 fBounds.outset(stroke.getWidth(), stroke.getWidth());
142 } 142 }
143 this->registerWithCache(); 143 this->registerWithCache();
144 } 144 }
145 145
146 GrGLPath::~GrGLPath() {
147 this->release();
148 }
149
150 void GrGLPath::onRelease() { 146 void GrGLPath::onRelease() {
151 if (0 != fPathID && !this->isWrapped()) { 147 if (0 != fPathID && !this->isWrapped()) {
152 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1); 148 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1);
153 fPathID = 0; 149 fPathID = 0;
154 } 150 }
155 151
156 INHERITED::onRelease(); 152 INHERITED::onRelease();
157 } 153 }
158 154
159 void GrGLPath::onAbandon() { 155 void GrGLPath::onAbandon() {
160 fPathID = 0; 156 fPathID = 0;
161 157
162 INHERITED::onAbandon(); 158 INHERITED::onAbandon();
163 } 159 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPath.h ('k') | src/gpu/gl/GrGLPathRange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698