| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #if SK_SUPPORT_GPU | 8 #if SK_SUPPORT_GPU |
| 9 | 9 |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| 11 #include "GrContextFactory.h" | 11 #include "GrContextFactory.h" |
| 12 #include "GrRenderTarget.h" | 12 #include "GrRenderTarget.h" |
| 13 #include "GrTexture.h" | 13 #include "GrTexture.h" |
| 14 #include "SkTypes.h" | 14 #include "SkTypes.h" |
| 15 #include "Test.h" | 15 #include "Test.h" |
| 16 | 16 |
| 17 DEF_GPUTEST(GrSurfaceTest, reporter, factory) { | 17 DEF_GPUTEST(GrSurface, reporter, factory) { |
| 18 GrContext* context = factory->get(GrContextFactory::kNull_GLContextType); | 18 GrContext* context = factory->get(GrContextFactory::kNull_GLContextType); |
| 19 if (NULL != context) { | 19 if (NULL != context) { |
| 20 GrTextureDesc desc; | 20 GrTextureDesc desc; |
| 21 desc.fConfig = kSkia8888_GrPixelConfig; | 21 desc.fConfig = kSkia8888_GrPixelConfig; |
| 22 desc.fFlags = kRenderTarget_GrTextureFlagBit; | 22 desc.fFlags = kRenderTarget_GrTextureFlagBit; |
| 23 desc.fWidth = 256; | 23 desc.fWidth = 256; |
| 24 desc.fHeight = 256; | 24 desc.fHeight = 256; |
| 25 desc.fSampleCnt = 0; | 25 desc.fSampleCnt = 0; |
| 26 GrSurface* texRT1 = context->createUncachedTexture(desc, NULL, 0); | 26 GrSurface* texRT1 = context->createUncachedTexture(desc, NULL, 0); |
| 27 GrSurface* texRT2 = context->createUncachedTexture(desc, NULL, 0); | 27 GrSurface* texRT2 = context->createUncachedTexture(desc, NULL, 0); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 52 REPORTER_ASSERT(reporter, !externalTexRT->asRenderTarget()->isSameAs(tex
RT1)); | 52 REPORTER_ASSERT(reporter, !externalTexRT->asRenderTarget()->isSameAs(tex
RT1)); |
| 53 | 53 |
| 54 texRT1->unref(); | 54 texRT1->unref(); |
| 55 texRT2->unref(); | 55 texRT2->unref(); |
| 56 tex1->unref(); | 56 tex1->unref(); |
| 57 externalTexRT->unref(); | 57 externalTexRT->unref(); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 #endif | 61 #endif |
| OLD | NEW |