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

Unified Diff: tests/GrSurfaceTest.cpp

Issue 596053002: Make "priv" classes for GrTexure and GrSurface. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add SK_API Created 6 years, 3 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/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GrSurfaceTest.cpp
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index a2ed62928e29221295591d4294b42441c6c00e3a..285e9e8ad811c53bd7f56439269b2860ae7d7642 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -11,6 +11,7 @@
#include "GrContextFactory.h"
#include "GrRenderTarget.h"
#include "GrTexture.h"
+#include "GrSurfacePriv.h"
#include "SkTypes.h"
#include "Test.h"
@@ -28,14 +29,14 @@ DEF_GPUTEST(GrSurface, reporter, factory) {
desc.fFlags = kNone_GrTextureFlags;
GrSurface* tex1 = context->createUncachedTexture(desc, NULL, 0);
- REPORTER_ASSERT(reporter, texRT1->isSameAs(texRT1));
- REPORTER_ASSERT(reporter, texRT1->isSameAs(texRT1->asRenderTarget()));
- REPORTER_ASSERT(reporter, texRT1->asRenderTarget()->isSameAs(texRT1));
- REPORTER_ASSERT(reporter, !texRT2->isSameAs(texRT1));
- REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->isSameAs(texRT1));
- REPORTER_ASSERT(reporter, !texRT2->isSameAs(texRT1->asRenderTarget()));
- REPORTER_ASSERT(reporter, !texRT2->isSameAs(tex1));
- REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->isSameAs(tex1));
+ REPORTER_ASSERT(reporter, texRT1->surfacePriv().isSameAs(texRT1));
+ REPORTER_ASSERT(reporter, texRT1->surfacePriv().isSameAs(texRT1->asRenderTarget()));
+ REPORTER_ASSERT(reporter, texRT1->asRenderTarget()->surfacePriv().isSameAs(texRT1));
+ REPORTER_ASSERT(reporter, !texRT2->surfacePriv().isSameAs(texRT1));
+ REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->surfacePriv().isSameAs(texRT1));
+ REPORTER_ASSERT(reporter, !texRT2->surfacePriv().isSameAs(texRT1->asRenderTarget()));
+ REPORTER_ASSERT(reporter, !texRT2->surfacePriv().isSameAs(tex1));
+ REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->surfacePriv().isSameAs(tex1));
GrBackendTextureDesc backendDesc;
backendDesc.fConfig = kSkia8888_GrPixelConfig;
@@ -45,11 +46,13 @@ DEF_GPUTEST(GrSurface, reporter, factory) {
backendDesc.fSampleCnt = 0;
backendDesc.fTextureHandle = 5;
GrSurface* externalTexRT = context->wrapBackendTexture(backendDesc);
- REPORTER_ASSERT(reporter, externalTexRT->isSameAs(externalTexRT));
- REPORTER_ASSERT(reporter, externalTexRT->isSameAs(externalTexRT->asRenderTarget()));
- REPORTER_ASSERT(reporter, externalTexRT->asRenderTarget()->isSameAs(externalTexRT));
- REPORTER_ASSERT(reporter, !externalTexRT->isSameAs(texRT1));
- REPORTER_ASSERT(reporter, !externalTexRT->asRenderTarget()->isSameAs(texRT1));
+ REPORTER_ASSERT(reporter, externalTexRT->surfacePriv().isSameAs(externalTexRT));
+ REPORTER_ASSERT(reporter,
+ externalTexRT->surfacePriv().isSameAs(externalTexRT->asRenderTarget()));
+ REPORTER_ASSERT(reporter,
+ externalTexRT->asRenderTarget()->surfacePriv().isSameAs(externalTexRT));
+ REPORTER_ASSERT(reporter, !externalTexRT->surfacePriv().isSameAs(texRT1));
+ REPORTER_ASSERT(reporter, !externalTexRT->asRenderTarget()->surfacePriv().isSameAs(texRT1));
texRT1->unref();
texRT2->unref();
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698