OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2014 Google Inc. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 | |
9 #ifndef GrGLTextureRenderTarget_DEFINED | |
10 #define GrGLTextureRenderTarget_DEFINED | |
11 | |
12 #include "GrGLTexture.h" | |
13 #include "GrGLRenderTarget.h" | |
14 | |
15 class GrGpuGL; | |
16 | |
17 #ifdef SK_BUILD_FOR_WIN | |
18 // Windows gives bogus warnings about inheriting asTexture/asRenderTarget via do minance. | |
19 #pragma warning(push) | |
20 #pragma warning(disable: 4250) | |
21 #endif | |
22 | |
23 class GrGLTextureRenderTarget : public GrGLTexture, public GrGLRenderTarget { | |
24 public: | |
25 GrGLTextureRenderTarget(GrGpuGL* gpu, | |
26 const GrSurfaceDesc& desc, | |
27 const GrGLTexture::IDDesc& texIDDesc, | |
28 const GrGLRenderTarget::IDDesc& rtIDDesc) | |
29 : GrGLTexture(gpu, desc, texIDDesc, GrGLTexture::kDerived) | |
30 , GrGLRenderTarget(gpu, desc, rtIDDesc, GrGLRenderTarget::kDerived) | |
robertphillips
2014/11/03 13:58:55
// Both GrRenderTarget and GrTexture virtually der
bsalomon
2014/11/03 15:20:15
Done.
| |
31 , GrSurface(gpu, texIDDesc.fIsWrapped, desc) { | |
32 this->registerWithCache(); | |
33 } | |
34 | |
35 virtual ~GrGLTextureRenderTarget() { this->release(); } | |
36 | |
37 // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuf fer's memory. | |
robertphillips
2014/11/03 13:58:55
this-> ?
bsalomon
2014/11/03 15:20:15
The class name scope takes the place of "this->".
| |
38 virtual size_t gpuMemorySize() const SK_OVERRIDE { return GrGLRenderTarget:: gpuMemorySize(); } | |
39 | |
40 protected: | |
robertphillips
2014/11/03 13:58:54
overlength ?
this-> ?
bsalomon
2014/11/03 15:20:15
wrapped
| |
41 virtual void onAbandon() SK_OVERRIDE { GrGLRenderTarget::onAbandon(); GrGLTe xture::onAbandon(); } | |
42 virtual void onRelease() SK_OVERRIDE { GrGLRenderTarget::onRelease(); GrGLTe xture::onRelease(); } | |
43 }; | |
44 | |
45 #ifdef SK_BUILD_FOR_WIN | |
46 #pragma warning(pop) | |
47 #endif | |
48 | |
49 #endif | |
OLD | NEW |