skia2/debugger/QT/SkGLWidget.h
commit-bot@chromium.org fde1e7ccb4 Support MSAA in the picture debugger
Add radio buttons for setting the GL sample count to 0 ("off"), 4 or
16.

Change the default mode of the GL widget to MSAA4. Previous behavior
corresponded to "off".

BUG=1459
R=robertphillips@google.com

Author: kkinnunen@nvidia.com

Review URL: https://chromiumcodereview.appspot.com/21752002

git-svn-id: http://skia.googlecode.com/svn/trunk@10509 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-02 13:59:50 +00:00

59 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 "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();
}
void setSampleCount(int sampleCount);
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 /* SK_SUPPORT_GPU */
#endif /* SKGLWIDGET_H_ */