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

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

Issue 1810323002: Cache render targets that render to wrapped textures Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 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 "GrGLPathRange.h" 9 #include "GrGLPathRange.h"
10 #include "GrGLPath.h" 10 #include "GrGLPath.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 GrGLPath::InitPathObjectPathData(gpu, fBasePathID + index, *skPath); 96 GrGLPath::InitPathObjectPathData(gpu, fBasePathID + index, *skPath);
97 } 97 }
98 // TODO: Use a better approximation for the individual path sizes. 98 // TODO: Use a better approximation for the individual path sizes.
99 fGpuMemorySize += 100; 99 fGpuMemorySize += 100;
100 } 100 }
101 101
102 void GrGLPathRange::onRelease() { 102 void GrGLPathRange::onRelease() {
103 SkASSERT(this->getGpu()); 103 SkASSERT(this->getGpu());
104 104
105 if (0 != fBasePathID && this->shouldFreeResources()) { 105 if (0 != fBasePathID) {
106 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fB asePathID, 106 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fB asePathID,
107 th is->getNumPaths()); 107 th is->getNumPaths());
108 fBasePathID = 0; 108 fBasePathID = 0;
109 } 109 }
110 110
111 INHERITED::onRelease(); 111 INHERITED::onRelease();
112 } 112 }
113 113
114 void GrGLPathRange::onAbandon() { 114 void GrGLPathRange::onAbandon() {
115 fBasePathID = 0; 115 fBasePathID = 0;
116 116
117 INHERITED::onAbandon(); 117 INHERITED::onAbandon();
118 } 118 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698