OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrGLTexture.h" | 8 #include "GrGLTexture.h" |
9 #include "GrGLGpu.h" | 9 #include "GrGLGpu.h" |
10 #include "SkTraceMemoryDump.h" | 10 #include "SkTraceMemoryDump.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 } | 85 } |
86 | 86 |
87 void GrGLTexture::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, | 87 void GrGLTexture::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, |
88 const SkString& dumpName) const { | 88 const SkString& dumpName) const { |
89 SkString texture_id; | 89 SkString texture_id; |
90 texture_id.appendU32(this->textureID()); | 90 texture_id.appendU32(this->textureID()); |
91 traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_texture", | 91 traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_texture", |
92 texture_id.c_str()); | 92 texture_id.c_str()); |
93 } | 93 } |
94 | 94 |
95 GrGLTexture* GrGLTexture::CreateWrapped(GrGLGpu* gpu, const GrSurfaceDesc& desc, | 95 sk_sp<GrGLTexture> GrGLTexture::MakeWrapped(GrGLGpu* gpu, const GrSurfaceDesc& d
esc, |
96 const IDDesc& idDesc) { | 96 const IDDesc& idDesc) { |
97 return new GrGLTexture(gpu, kWrapped, desc, idDesc); | 97 return sk_sp<GrGLTexture>(new GrGLTexture(gpu, kWrapped, desc, idDesc)); |
98 } | 98 } |
99 | 99 |
OLD | NEW |