blob: 82e8a21148cd5f53cede428e7cfc82f30c7a1e40 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EXAMPLES_GANESH_APP_GANESH_CONTEXT_H_
#define EXAMPLES_GANESH_APP_GANESH_CONTEXT_H_
#include "base/basictypes.h"
#include "mojo/public/c/gles2/gles2.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/gpu/GrContext.h"
namespace mojo {
namespace examples {
class GaneshContext {
public:
// The gl_context must outlive the GaneshContext.
explicit GaneshContext(MojoGLES2Context gl_context);
~GaneshContext();
GrContext* context() const { return context_.get(); }
private:
skia::RefPtr<GrContext> context_;
DISALLOW_COPY_AND_ASSIGN(GaneshContext);
};
} // namespace examples
} // namespace mojo
#endif // EXAMPLES_GANESH_APP_GANESH_CONTEXT_H_