skia2/debugger/QT/SkGLWidget.h
Robert Phillips 646e4293f0 Retract GrTexture*.h & GrRenderTarget*.h from other headers
This does push some additional work (& includes) into the .cpp files.

Change-Id: I27c847e371802270d13594dcc22aae44039990bb
Reviewed-on: https://skia-review.googlesource.com/19660
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-13 17:21:41 +00:00

60 lines
1.0 KiB
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_
#if SK_SUPPORT_GPU
#include <QtOpenGL/QGLWidget>
#include "SkDebugCanvas.h"
#include "SkDebugger.h"
#include "SkGpuDevice.h"
#include "GrContext.h"
#include "gl/GrGLInterface.h"
#include "gl/GrGLUtil.h"
class SkGLWidget : public QGLWidget {
Q_OBJECT
public:
SkGLWidget(SkDebugger* debugger);
~SkGLWidget();
void updateImage() {
this->updateGL();
}
void setSampleCount(int sampleCount);
Q_SIGNALS:
void drawComplete();
protected:
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
private:
void createRenderTarget();
sk_sp<const GrGLInterface> fCurIntf;
sk_sp<GrContext> fCurContext;
sk_sp<SkSurface> fGpuSurface;
SkCanvas* fCanvas;
SkDebugger* fDebugger;
GrBackendRenderTargetDesc getDesc(int w, int h);
};
#endif /* SK_SUPPORT_GPU */
#endif /* SKGLWIDGET_H_ */