skia2/debugger/QT/SkGLWidget.h
Brian Salomon f43d0001e4 Revert "Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""""
This reverts commit 6df4d6be0d.

Reason for revert: Google3 fix landed

Original change's description:
> Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""
> 
> This reverts commit 71554bc256.
> 
> Reason for revert: Google3
> 
> Original change's description:
> > Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
> > 
> > This reverts commit 807371c15b.
> > 
> > Docs-Preview: https://skia.org/?cl=40260
> > Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
> > Reviewed-on: https://skia-review.googlesource.com/40260
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ifdfa896a70db69935473276d12dce54de5c6b6f7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/41500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I827419bb19972c3644929a8c984bb9534baab0ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/41700
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-31 20:04:12 +00:00

61 lines
1.1 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 "GrBackendSurface.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;
GrBackendRenderTarget getBackendRenderTarget();
};
#endif /* SK_SUPPORT_GPU */
#endif /* SKGLWIDGET_H_ */