Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f6ed96d

Browse files
egdanielSkia Commit-Bot
authored andcommitted
Revert "Move GrGpuResource GrSurface and GrTexture into src."
This reverts commit e5a06ce. Reason for revert: Need to make change in google3 first Original change's description: > Move GrGpuResource GrSurface and GrTexture into src. > > Must land https://chromium-review.googlesource.com/c/chromium/src/+/2087980 > before this can land. > > Bug: skia:7966 > Change-Id: I60bbb1765bfbb2c96b2bc0c9826b6b9d57eb2a03 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275077 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Id39e0a351e49a87209de88a6ad9fadb0219db72c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7966 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275216 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
1 parent f1d78a6 commit f6ed96d

File tree

127 files changed

+135
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+135
-138
lines changed

RELEASE_NOTES.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ This file includes a list of high level updates for each milestone release.
77
Milestone 82
88

99
<Insert new notes here- top is most recent.>
10-
* Removed GrGpuResource, GrSurface, and GrTexture from public api. These were not
11-
meant to be public, and we now can move them into src.
12-
1310
* Removed Bones from SkVertices
1411

1512
* Added a field to GrContextOptions that controls whether GL errors are checked after

bench/GrResourceCacheBench.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
#include "include/core/SkCanvas.h"
1111
#include "include/gpu/GrContext.h"
12+
#include "include/gpu/GrGpuResource.h"
1213
#include "src/gpu/GrContextPriv.h"
1314
#include "src/gpu/GrGpu.h"
14-
#include "src/gpu/GrGpuResource.h"
1515
#include "src/gpu/GrGpuResourcePriv.h"
1616
#include "src/gpu/GrResourceCache.h"
1717

gn/gpu.gni

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ skia_gpu_sources = [
1616
"$_include/gpu/GrContext.h",
1717
"$_include/gpu/GrContextThreadSafeProxy.h",
1818
"$_include/gpu/GrDriverBugWorkarounds.h",
19+
"$_include/gpu/GrGpuResource.h",
20+
"$_include/gpu/GrSurface.h",
21+
"$_include/gpu/GrTexture.h",
1922
"$_include/gpu/GrTypes.h",
2023

2124
# Private includes
@@ -99,10 +102,9 @@ skia_gpu_sources = [
99102
"$_src/gpu/GrGpu.h",
100103
"$_src/gpu/GrGpuBuffer.cpp",
101104
"$_src/gpu/GrGpuBuffer.h",
102-
"$_src/gpu/GrGpuResource.cpp",
103-
"$_src/gpu/GrGpuResource.h",
104105
"$_src/gpu/GrGpuResourceCacheAccess.h",
105106
"$_src/gpu/GrGpuResourcePriv.h",
107+
"$_src/gpu/GrGpuResource.cpp",
106108
"$_src/gpu/GrImageContext.cpp",
107109
"$_src/gpu/GrImageContextPriv.h",
108110
"$_src/gpu/GrImageInfo.h",
@@ -192,7 +194,6 @@ skia_gpu_sources = [
192194
"$_src/gpu/GrStyle.cpp",
193195
"$_src/gpu/GrStyle.h",
194196
"$_src/gpu/GrSurface.cpp",
195-
"$_src/gpu/GrSurface.h",
196197
"$_src/gpu/GrSurfaceContext.cpp",
197198
"$_src/gpu/GrSurfaceContext.h",
198199
"$_src/gpu/GrSurfaceContextPriv.h",
@@ -213,7 +214,6 @@ skia_gpu_sources = [
213214
"$_src/gpu/GrTestUtils.cpp",
214215
"$_src/gpu/GrTestUtils.h",
215216
"$_src/gpu/GrTexture.cpp",
216-
"$_src/gpu/GrTexture.h",
217217
"$_src/gpu/GrTextureAdjuster.cpp",
218218
"$_src/gpu/GrTextureAdjuster.h",
219219
"$_src/gpu/GrTextureMaker.cpp",

src/gpu/GrGpuResource.h renamed to include/gpu/GrGpuResource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ template <typename DERIVED> class GrIORef : public SkNoncopyable {
8585
/**
8686
* Base class for objects that can be kept in the GrResourceCache.
8787
*/
88-
class GrGpuResource : public GrIORef<GrGpuResource> {
88+
class SK_API GrGpuResource : public GrIORef<GrGpuResource> {
8989
public:
9090
/**
9191
* Tests whether a object has been abandoned or released. All objects will

src/gpu/GrSurface.h renamed to include/gpu/GrSurface.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include "include/core/SkImageInfo.h"
1212
#include "include/core/SkRect.h"
1313
#include "include/gpu/GrBackendSurface.h"
14+
#include "include/gpu/GrGpuResource.h"
1415
#include "include/gpu/GrTypes.h"
15-
#include "src/gpu/GrGpuResource.h"
1616

1717
class GrRenderTarget;
1818
class GrSurfacePriv;
@@ -42,7 +42,7 @@ class GrSurface : public GrGpuResource {
4242

4343
virtual GrBackendFormat backendFormat() const = 0;
4444

45-
void setRelease(sk_sp<GrRefCntedCallback> releaseHelper) {
45+
SK_API void setRelease(sk_sp<GrRefCntedCallback> releaseHelper) {
4646
this->onSetRelease(releaseHelper);
4747
fReleaseHelper = std::move(releaseHelper);
4848
}
@@ -51,7 +51,7 @@ class GrSurface : public GrGpuResource {
5151
// TODO: Remove Chrome's need to call this on a GrTexture
5252
typedef void* ReleaseCtx;
5353
typedef void (*ReleaseProc)(ReleaseCtx);
54-
void setRelease(ReleaseProc proc, ReleaseCtx ctx) {
54+
SK_API void setRelease(ReleaseProc proc, ReleaseCtx ctx) {
5555
sk_sp<GrRefCntedCallback> helper(new GrRefCntedCallback(proc, ctx));
5656
this->setRelease(std::move(helper));
5757
}

src/gpu/GrTexture.h renamed to include/gpu/GrTexture.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "include/core/SkPoint.h"
1414
#include "include/core/SkRefCnt.h"
1515
#include "include/gpu/GrBackendSurface.h"
16+
#include "include/gpu/GrSurface.h"
1617
#include "include/private/GrTypesPriv.h"
17-
#include "src/gpu/GrSurface.h"
1818

1919
class GrTexturePriv;
2020

@@ -29,7 +29,7 @@ class GrTexture : virtual public GrSurface {
2929
* This function indicates that the texture parameters (wrap mode, filtering, ...) have been
3030
* changed externally to Skia.
3131
*/
32-
virtual void textureParamsModified() = 0;
32+
SK_API virtual void textureParamsModified() = 0;
3333

3434
/**
3535
* This function steals the backend texture from a uniquely owned GrTexture with no pending

src/core/SkDeferredDisplayListRecorder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ sk_sp<SkImage> SkDeferredDisplayListRecorder::makeYUVAPromiseTexture(
6161

6262
#include "include/core/SkPromiseImageTexture.h"
6363
#include "include/core/SkYUVASizeInfo.h"
64+
#include "include/gpu/GrTexture.h"
6465
#include "src/gpu/GrContextPriv.h"
6566
#include "src/gpu/GrProxyProvider.h"
6667
#include "src/gpu/GrRenderTargetContext.h"
67-
#include "src/gpu/GrTexture.h"
6868
#include "src/gpu/SkGr.h"
6969
#include "src/image/SkImage_Gpu.h"
7070
#include "src/image/SkImage_GpuYUVA.h"

src/effects/imagefilters/SkDisplacementMapEffect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
#include "src/core/SkSpecialImage.h"
1616
#include "src/core/SkWriteBuffer.h"
1717
#if SK_SUPPORT_GPU
18+
#include "include/gpu/GrTexture.h"
1819
#include "include/private/GrRecordingContext.h"
1920
#include "src/gpu/GrCaps.h"
2021
#include "src/gpu/GrClip.h"
2122
#include "src/gpu/GrColorSpaceXform.h"
2223
#include "src/gpu/GrCoordTransform.h"
2324
#include "src/gpu/GrRecordingContextPriv.h"
2425
#include "src/gpu/GrRenderTargetContext.h"
25-
#include "src/gpu/GrTexture.h"
2626
#include "src/gpu/GrTextureProxy.h"
2727
#include "src/gpu/SkGr.h"
2828
#include "src/gpu/effects/GrTextureDomain.h"

src/effects/imagefilters/SkLightingImageFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
#include "src/core/SkWriteBuffer.h"
1818

1919
#if SK_SUPPORT_GPU
20+
#include "include/gpu/GrTexture.h"
2021
#include "include/private/GrRecordingContext.h"
2122
#include "src/gpu/GrCaps.h"
2223
#include "src/gpu/GrFixedClip.h"
2324
#include "src/gpu/GrFragmentProcessor.h"
2425
#include "src/gpu/GrPaint.h"
2526
#include "src/gpu/GrRecordingContextPriv.h"
2627
#include "src/gpu/GrRenderTargetContext.h"
27-
#include "src/gpu/GrTexture.h"
2828
#include "src/gpu/GrTextureProxy.h"
2929

3030
#include "src/gpu/SkGr.h"

src/effects/imagefilters/SkMagnifierImageFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
////////////////////////////////////////////////////////////////////////////////
1919
#if SK_SUPPORT_GPU
2020
#include "include/gpu/GrContext.h"
21+
#include "include/gpu/GrTexture.h"
2122
#include "src/gpu/GrColorSpaceXform.h"
2223
#include "src/gpu/GrCoordTransform.h"
23-
#include "src/gpu/GrTexture.h"
2424
#include "src/gpu/effects/generated/GrMagnifierEffect.h"
2525
#include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
2626
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"

0 commit comments

Comments
 (0)