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

Unified Diff: src/gpu/GrTexture.cpp

Issue 695813003: Add class GrGLTextureRenderTarget for GL texture/rendertarget objects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: forgot to save file 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrTexture.cpp
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index 2717b3192fa99991816ab9d4db87812d1e217808..21395409d64bb7b818ff520b8a0abf2bb0725008 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -6,21 +6,13 @@
* found in the LICENSE file.
*/
-
#include "GrContext.h"
#include "GrDrawTargetCaps.h"
#include "GrGpu.h"
-#include "GrRenderTarget.h"
#include "GrResourceCache.h"
#include "GrTexture.h"
#include "GrTexturePriv.h"
-GrTexture::~GrTexture() {
- if (fRenderTarget.get()) {
- fRenderTarget.get()->owningTextureDestroyed();
- }
-}
-
void GrTexture::dirtyMipMaps(bool mipMapsDirty) {
if (mipMapsDirty) {
if (kValid_MipMapsStatus == fMipMapsStatus) {
@@ -53,18 +45,6 @@ size_t GrTexture::gpuMemorySize() const {
return textureSize;
}
-void GrTexture::onRelease() {
-
- INHERITED::onRelease();
-}
-
-void GrTexture::onAbandon() {
- if (fRenderTarget.get()) {
- fRenderTarget->abandon();
- }
- INHERITED::onAbandon();
-}
-
void GrTexture::validateDesc() const {
if (this->asRenderTarget()) {
// This texture has a render target
@@ -140,7 +120,6 @@ GrSurfaceOrigin resolve_origin(const GrSurfaceDesc& desc) {
//////////////////////////////////////////////////////////////////////////////
GrTexture::GrTexture(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc)
: INHERITED(gpu, isWrapped, desc)
- , fRenderTarget(NULL)
, fMipMapsStatus(kNotAllocated_MipMapsStatus) {
this->setScratchKey(GrTexturePriv::ComputeScratchKey(desc));
// only make sense if alloc size is pow2

Powered by Google App Engine
This is Rietveld 408576698