aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-04-27 18:48:15 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-27 18:48:19 +0000
commite3bd422fafc74dd3410c3de24a576635be92c3b4 (patch)
tree63bc3f6768299f8e4dde996df333ea4022855efe /tools
parentdf7e075c74110fcfebdc49ca503684162e118af5 (diff)
Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. Reason for revert: Apparently I have a few more build files to update before this can land. Original change's description: > Plumb the use of GrBackendRenderTarget throughout Skia > > Bug: skia: > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > Reviewed-on: https://skia-review.googlesource.com/14148 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f Reviewed-on: https://skia-review.googlesource.com/14531 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gpu/GrTest.cpp3
-rw-r--r--tools/viewer/sk_app/GLWindowContext.cpp34
2 files changed, 17 insertions, 20 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index c7751ec60a..2e34d2ff5b 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -359,8 +359,7 @@ private:
return nullptr;
}
- sk_sp<GrRenderTarget> onWrapBackendRenderTarget(const GrBackendRenderTarget&,
- GrSurfaceOrigin) override {
+ sk_sp<GrRenderTarget> onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) override {
return nullptr;
}
diff --git a/tools/viewer/sk_app/GLWindowContext.cpp b/tools/viewer/sk_app/GLWindowContext.cpp
index 6195199ce0..ff56ce8668 100644
--- a/tools/viewer/sk_app/GLWindowContext.cpp
+++ b/tools/viewer/sk_app/GLWindowContext.cpp
@@ -6,18 +6,19 @@
* found in the LICENSE file.
*/
-#include "GrBackendSurface.h"
#include "GrContext.h"
-#include "GrRenderTarget.h"
+#include "SkSurface.h"
#include "GLWindowContext.h"
#include "gl/GrGLDefines.h"
+
#include "gl/GrGLUtil.h"
+#include "GrRenderTarget.h"
+#include "GrContext.h"
#include "SkCanvas.h"
#include "SkImage_Base.h"
#include "SkMathPriv.h"
-#include "SkSurface.h"
namespace sk_app {
@@ -63,7 +64,7 @@ void GLWindowContext::destroyContext() {
fContext->unref();
fContext = nullptr;
}
-
+
fBackendContext.reset(nullptr);
this->onDestroyContext();
@@ -72,21 +73,18 @@ void GLWindowContext::destroyContext() {
sk_sp<SkSurface> GLWindowContext::getBackbufferSurface() {
if (nullptr == fSurface) {
if (fContext) {
- GrGLFramebufferInfo fbInfo;
+ GrBackendRenderTargetDesc desc;
+ desc.fWidth = this->fWidth;
+ desc.fHeight = this->fHeight;
+ desc.fConfig = fPixelConfig;
+ desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
+ desc.fSampleCnt = fSampleCount;
+ desc.fStencilBits = fStencilBits;
GrGLint buffer;
- GR_GL_CALL(fBackendContext.get(), GetIntegerv(GR_GL_FRAMEBUFFER_BINDING,
- &buffer));
- fbInfo.fFBOID = buffer;
-
- GrBackendRenderTarget backendRT(fWidth,
- fHeight,
- fSampleCount,
- fStencilBits,
- fPixelConfig,
- fbInfo);
-
- fSurface = SkSurface::MakeFromBackendRenderTarget(fContext, backendRT,
- kBottomLeft_GrSurfaceOrigin,
+ GR_GL_CALL(fBackendContext.get(), GetIntegerv(GR_GL_FRAMEBUFFER_BINDING, &buffer));
+ desc.fRenderTargetHandle = buffer;
+
+ fSurface = SkSurface::MakeFromBackendRenderTarget(fContext, desc,
fDisplayParams.fColorSpace,
&fSurfaceProps);
}