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

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

Issue 504313002: Make GrGpuResources register with GrResourceCache2 after fully constructed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix insertion for GlyphPathRange. 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();
139 } 140 }
140 141
141 GrGLPath::~GrGLPath() { 142 GrGLPath::~GrGLPath() {
142 this->release(); 143 this->release();
143 } 144 }
144 145
145 void GrGLPath::onRelease() { 146 void GrGLPath::onRelease() {
146 if (0 != fPathID && !this->isWrapped()) { 147 if (0 != fPathID && !this->isWrapped()) {
147 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1); 148 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP athID, 1);
148 fPathID = 0; 149 fPathID = 0;
149 } 150 }
150 151
151 INHERITED::onRelease(); 152 INHERITED::onRelease();
152 } 153 }
153 154
154 void GrGLPath::onAbandon() { 155 void GrGLPath::onAbandon() {
155 fPathID = 0; 156 fPathID = 0;
156 157
157 INHERITED::onAbandon(); 158 INHERITED::onAbandon();
158 } 159 }
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