skia2/debugger/QT/SkGLWidget.h
bsalomon@google.com 16e3ddea6a Platform/Engine -> Backend
createPlatform -> wrapBackend

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6785044

git-svn-id: http://skia.googlecode.com/svn/trunk@6123 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 18:43:28 +00:00

55 lines
955 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 SKGLWIDGET_H_
#define SKGLWIDGET_H_
#include <QtOpenGL/QGLWidget>
#include "SkDebugCanvas.h"
#include "SkDebugger.h"
#include "SkDevice.h"
#include "SkGpuDevice.h"
#include "GrContext.h"
#include "gl/GrGLInterface.h"
#include "gl/GrGLUtil.h"
#include "GrRenderTarget.h"
class SkGLWidget : public QGLWidget {
Q_OBJECT
public:
SkGLWidget(SkDebugger* debugger);
~SkGLWidget();
void draw() {
this->updateGL();
}
signals:
void drawComplete();
protected:
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
private:
const GrGLInterface* fCurIntf;
GrContext* fCurContext;
SkGpuDevice* fGpuDevice;
SkCanvas* fCanvas;
SkDebugger* fDebugger;
GrBackendRenderTargetDesc getDesc(int w, int h);
};
#endif /* SKGLWIDGET_H_ */