diff options
author | 2018-05-10 12:57:17 -0400 | |
---|---|---|
committer | 2018-05-10 19:14:16 +0000 | |
commit | 52aacd602f792a01218ca903759f6b9d4ec28450 (patch) | |
tree | ec5a18a5f4493fcbfe785777d02bbe8d7149ca2d /include/core/SkSurfaceCharacterization.h | |
parent | ce4cf72e3487f661e53f6d0c3416c9b58da4fd00 (diff) |
Add GrContextThreadSafeProxy and remove most friends of GrContextThreadSafeProxy
A step towards removing GrCaps from GrContext.h
Also adds operator== to GrContextThreadSafeProxy.
Change-Id: Ic0bae12299dfb0ac8817d9f1c56a1219d6df97d9
Reviewed-on: https://skia-review.googlesource.com/127329
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/core/SkSurfaceCharacterization.h')
-rw-r--r-- | include/core/SkSurfaceCharacterization.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/include/core/SkSurfaceCharacterization.h b/include/core/SkSurfaceCharacterization.h index e8efdcf2a9..2abd5b6555 100644 --- a/include/core/SkSurfaceCharacterization.h +++ b/include/core/SkSurfaceCharacterization.h @@ -54,24 +54,7 @@ public: return !(*this == other); } - SkSurfaceCharacterization createResized(int width, int height) const { - const GrCaps* caps = fContextInfo->caps(); - if (!caps) { - return SkSurfaceCharacterization(); - } - - if (width <= 0 || height <= 0 || - width > caps->maxRenderTargetSize() || height > caps->maxRenderTargetSize()) { - return SkSurfaceCharacterization(); - } - - return SkSurfaceCharacterization(fContextInfo, - fCacheMaxResourceBytes, - fImageInfo.makeWH(width, height), - fOrigin, fConfig, fFSAAType, fStencilCnt, - fIsTextureable, fIsMipMapped, fUsesGLFBO0, - fSurfaceProps); - } + SkSurfaceCharacterization createResized(int width, int height) const; GrContextThreadSafeProxy* contextInfo() const { return fContextInfo.get(); } sk_sp<GrContextThreadSafeProxy> refContextInfo() const { return fContextInfo; } |