skia2/include/gpu/gl/SkNullGLContext.h
cdalton d416a5b10f Implement SkGLContext swapBuffers with fence syncs
Improves the GPU measuring accuracy of nanobench by using fence syncs.
Fence syncs are very widely supported and available on almost every
platform.

NO_MERGE_BUILDS
BUG=skia:

Review URL: https://codereview.chromium.org/1194783003
2015-06-23 13:23:44 -07:00

32 lines
666 B
C++

/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkNullGLContext_DEFINED
#define SkNullGLContext_DEFINED
#include "gl/SkGLContext.h"
class SK_API SkNullGLContext : public SkGLContext {
public:
~SkNullGLContext() override;
static SkNullGLContext* Create(GrGLStandard);
class ContextState;
private:
SkNullGLContext();
void onPlatformMakeCurrent() const override;
void onPlatformSwapBuffers() const override {}
GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return NULL; }
ContextState* fState;
};
#endif