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

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

Issue 488463004: Revert of Make GrGpuResources register with GrResourceCache2 after fully constructed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/GrGLIndexBuffer.cpp ('k') | src/gpu/gl/GrGLRenderTarget.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 : INHERITED(gpu, kIsWrapped, path, stroke), 129 : INHERITED(gpu, kIsWrapped, path, stroke),
130 fPathID(gpu->glPathRendering()->genPaths(1)) { 130 fPathID(gpu->glPathRendering()->genPaths(1)) {
131 SkASSERT(!path.isEmpty()); 131 SkASSERT(!path.isEmpty());
132 132
133 InitPathObject(gpu, fPathID, fSkPath, stroke); 133 InitPathObject(gpu, fPathID, fSkPath, stroke);
134 134
135 if (stroke.needToApply()) { 135 if (stroke.needToApply()) {
136 // FIXME: try to account for stroking, without rasterizing the stroke. 136 // FIXME: try to account for stroking, without rasterizing the stroke.
137 fBounds.outset(stroke.getWidth(), stroke.getWidth()); 137 fBounds.outset(stroke.getWidth(), stroke.getWidth());
138 } 138 }
139 this->registerWithCache();
140 } 139 }
141 140
142 GrGLPath::~GrGLPath() { 141 GrGLPath::~GrGLPath() {
143 this->release(); 142 this->release();
144 } 143 }
145 144
146 void GrGLPath::onRelease() { 145 void GrGLPath::onRelease() {
147 if (0 != fPathID && !this->isWrapped()) { 146 if (0 != fPathID && !this->isWrapped()) {
148 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1); 147 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1);
149 fPathID = 0; 148 fPathID = 0;
150 } 149 }
151 150
152 INHERITED::onRelease(); 151 INHERITED::onRelease();
153 } 152 }
154 153
155 void GrGLPath::onAbandon() { 154 void GrGLPath::onAbandon() {
156 fPathID = 0; 155 fPathID = 0;
157 156
158 INHERITED::onAbandon(); 157 INHERITED::onAbandon();
159 } 158 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLIndexBuffer.cpp ('k') | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698