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

Side by Side Diff: src/gpu/gl/GrGLPathRange.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/GrGLPath.cpp ('k') | src/gpu/gl/GrGLRenderTarget.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 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 GrGLPath::InitPathObject(gpu, fBasePathID + index, *skPath, *stroke); 83 GrGLPath::InitPathObject(gpu, fBasePathID + index, *skPath, *stroke);
84 84
85 // TODO: Use a better approximation for the individual path sizes. 85 // TODO: Use a better approximation for the individual path sizes.
86 fGpuMemorySize += 100; 86 fGpuMemorySize += 100;
87 } 87 }
88 88
89 void GrGLPathRange::onRelease() { 89 void GrGLPathRange::onRelease() {
90 SkASSERT(this->getGpu()); 90 SkASSERT(this->getGpu());
91 91
92 if (0 != fBasePathID && !this->isWrapped()) { 92 if (0 != fBasePathID && this->shouldFreeResources()) {
93 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fB asePathID, 93 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fB asePathID,
94 th is->getNumPaths()); 94 th is->getNumPaths());
95 fBasePathID = 0; 95 fBasePathID = 0;
96 } 96 }
97 97
98 INHERITED::onRelease(); 98 INHERITED::onRelease();
99 } 99 }
100 100
101 void GrGLPathRange::onAbandon() { 101 void GrGLPathRange::onAbandon() {
102 fBasePathID = 0; 102 fBasePathID = 0;
103 103
104 INHERITED::onAbandon(); 104 INHERITED::onAbandon();
105 } 105 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPath.cpp ('k') | src/gpu/gl/GrGLRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698