Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: src/gpu/GrTextureProxy.cpp

Issue 1944953002: Revert of Add Gr*Proxy classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrSurfaceProxy.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextureProxy.cpp
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
deleted file mode 100644
index 09c22e37b0f16142cb9db1122fa30915cc8eed18..0000000000000000000000000000000000000000
--- a/src/gpu/GrTextureProxy.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrTextureProxy.h"
-
-#include "GrTextureProvider.h"
-#include "GrGpuResourcePriv.h"
-
-GrTextureProxy::GrTextureProxy(sk_sp<GrTexture> tex)
- : INHERITED(tex->desc(), SkBackingFit::kExact, tex->resourcePriv().isBudgeted())
- , fTexture(std::move(tex)) {
-}
-
-GrTexture* GrTextureProxy::instantiate(GrTextureProvider* texProvider) {
- if (fTexture) {
- return fTexture.get();
- }
-
- if (SkBackingFit::kApprox == fFit) {
- fTexture.reset(texProvider->createApproxTexture(fDesc));
- } else {
- fTexture.reset(texProvider->createTexture(fDesc, fBudgeted));
- }
-
- return fTexture.get();
-}
-
-sk_sp<GrTextureProxy> GrTextureProxy::Make(const GrSurfaceDesc& desc,
- SkBackingFit fit,
- SkBudgeted budgeted,
- const void* srcData,
- size_t rowBytes) {
- // TODO: handle 'srcData' (we could use the wrapped version if there is data)
- SkASSERT(!srcData && !rowBytes);
- return sk_sp<GrTextureProxy>(new GrTextureProxy(desc, fit, budgeted, srcData, rowBytes));
-}
-
-sk_sp<GrTextureProxy> GrTextureProxy::Make(sk_sp<GrTexture> tex) {
- return sk_sp<GrTextureProxy>(new GrTextureProxy(tex));
-}
« no previous file with comments | « src/gpu/GrSurfaceProxy.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698