skia2/include/gpu/gl/SkDebugGLContext.h
bsalomon 944bcf0acb Some fixes around GrContext::abandonContext:
Fix debug crash when GrResourceCache is destroyed after GrContext is abandoned while GrTextures are in the exlusive list.

Notify debug GL context that GL resources are expected to remain undeleted when context is destroyed after being abandoned.

Stop leaking program cache entries when context is abandoned.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/422323002
2014-07-29 08:01:52 -07:00

28 lines
601 B
C++

/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkDebugGLContext_DEFINED
#define SkDebugGLContext_DEFINED
#include "SkGLContextHelper.h"
class SkDebugGLContext : public SkGLContextHelper {
public:
SkDebugGLContext() {}
virtual void makeCurrent() const SK_OVERRIDE {}
virtual void swapBuffers() const SK_OVERRIDE {}
protected:
virtual const GrGLInterface* createGLContext(GrGLStandard forcedGpuAPI) SK_OVERRIDE;
virtual void destroyGLContext() SK_OVERRIDE {};
};
#endif