aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceProxy.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-12-13 18:48:08 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-13 18:48:20 +0000
commit293d696fcfb9f1c83019c4b15c4864cd6649ed78 (patch)
tree851514d761f33f5c508ddb8009338723cf52f27a /src/gpu/GrSurfaceProxy.cpp
parent3c41773fcd5c8f4462aefcb2a5927aecdb2a1806 (diff)
Revert "Add a deferred copy surface"
This reverts commit 4431de6af930a8638c194b072558ea3a4b79d908. Reason for revert: ANGLE errors (at the very least) Original change's description: > Add a deferred copy surface > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > Change-Id: Iab1867668d8146a766201158a251b9174438ee2b > Reviewed-on: https://skia-review.googlesource.com/5773 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f Reviewed-on: https://skia-review.googlesource.com/5938 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceProxy.cpp')
-rw-r--r--src/gpu/GrSurfaceProxy.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 24c7cfe29a..4a0c3480a4 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -8,11 +8,8 @@
#include "GrSurfaceProxy.h"
#include "GrCaps.h"
-#include "GrContext.h"
-#include "GrContextPriv.h"
#include "GrGpuResourcePriv.h"
#include "GrOpList.h"
-#include "GrSurfaceContext.h"
#include "GrTextureProvider.h"
#include "GrTextureRenderTargetProxy.h"
@@ -164,50 +161,3 @@ void GrSurfaceProxy::validate(GrContext* context) const {
INHERITED::validate();
}
#endif
-
-sk_sp<GrSurfaceProxy> GrSurfaceProxy::Copy(GrContext* context,
- GrSurfaceProxy* src,
- SkIRect srcRect,
- SkBudgeted budgeted) {
- if (!srcRect.intersect(SkIRect::MakeWH(src->width(), src->height()))) {
- return nullptr;
- }
-
- GrSurfaceDesc dstDesc = src->desc();
- dstDesc.fWidth = srcRect.width();
- dstDesc.fHeight = srcRect.height();
-
- sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext(dstDesc,
- budgeted));
- if (!dstContext) {
- return nullptr;
- }
-
- if (!dstContext->copy(src, srcRect, SkIPoint::Make(0, 0))) {
- return nullptr;
- }
-
- return sk_ref_sp(dstContext->asDeferredSurface());
-}
-
-sk_sp<GrSurfaceProxy> GrSurfaceProxy::TestCopy(GrContext* context, const GrSurfaceDesc& dstDesc,
- GrTexture* srcTexture, SkBudgeted budgeted) {
-
- sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext(
- dstDesc,
- budgeted));
- if (!dstContext) {
- return nullptr;
- }
-
- sk_sp<GrSurfaceProxy> srcProxy(GrSurfaceProxy::MakeWrapped(sk_ref_sp(srcTexture)));
- if (!srcProxy) {
- return nullptr;
- }
-
- if (!dstContext->copy(srcProxy.get())) {
- return nullptr;
- }
-
- return sk_ref_sp(dstContext->asDeferredSurface());
-}