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

Side by Side Diff: src/gpu/gl/GrGLPathRange.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/GrGLPathRange.h ('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 11 matching lines...) Expand all
22 GrGLuint basePathID, 22 GrGLuint basePathID,
23 int numPaths, 23 int numPaths,
24 size_t gpuMemorySize, 24 size_t gpuMemorySize,
25 const SkStrokeRec& stroke) 25 const SkStrokeRec& stroke)
26 : INHERITED(gpu, numPaths, stroke), 26 : INHERITED(gpu, numPaths, stroke),
27 fBasePathID(basePathID), 27 fBasePathID(basePathID),
28 fGpuMemorySize(gpuMemorySize) { 28 fGpuMemorySize(gpuMemorySize) {
29 this->registerWithCache(); 29 this->registerWithCache();
30 } 30 }
31 31
32 GrGLPathRange::~GrGLPathRange() {
33 this->release();
34 }
35
36 void GrGLPathRange::onInitPath(int index, const SkPath& skPath) const { 32 void GrGLPathRange::onInitPath(int index, const SkPath& skPath) const {
37 GrGpuGL* gpu = static_cast<GrGpuGL*>(this->getGpu()); 33 GrGpuGL* gpu = static_cast<GrGpuGL*>(this->getGpu());
38 if (NULL == gpu) { 34 if (NULL == gpu) {
39 return; 35 return;
40 } 36 }
41 37
42 // Make sure the path at this index hasn't been initted already. 38 // Make sure the path at this index hasn't been initted already.
43 SkDEBUGCODE( 39 SkDEBUGCODE(
44 GrGLboolean isPath; 40 GrGLboolean isPath;
45 GR_GL_CALL_RET(gpu->glInterface(), isPath, IsPath(fBasePathID + index))) ; 41 GR_GL_CALL_RET(gpu->glInterface(), isPath, IsPath(fBasePathID + index))) ;
(...skipping 15 matching lines...) Expand all
61 } 57 }
62 58
63 INHERITED::onRelease(); 59 INHERITED::onRelease();
64 } 60 }
65 61
66 void GrGLPathRange::onAbandon() { 62 void GrGLPathRange::onAbandon() {
67 fBasePathID = 0; 63 fBasePathID = 0;
68 64
69 INHERITED::onAbandon(); 65 INHERITED::onAbandon();
70 } 66 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRange.h ('k') | src/gpu/gl/GrGLRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698