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 #include "TestClassDef.h" | |
17 | 16 |
18 DEF_GPUTEST(GrSurfaceTest, reporter, factory) { | 17 DEF_GPUTEST(GrSurfaceTest, reporter, factory) { |
19 GrContext* context = factory->get(GrContextFactory::kNull_GLContextType); | 18 GrContext* context = factory->get(GrContextFactory::kNull_GLContextType); |
20 if (NULL != context) { | 19 if (NULL != context) { |
21 GrTextureDesc desc; | 20 GrTextureDesc desc; |
22 desc.fConfig = kSkia8888_GrPixelConfig; | 21 desc.fConfig = kSkia8888_GrPixelConfig; |
23 desc.fFlags = kRenderTarget_GrTextureFlagBit; | 22 desc.fFlags = kRenderTarget_GrTextureFlagBit; |
24 desc.fWidth = 256; | 23 desc.fWidth = 256; |
25 desc.fHeight = 256; | 24 desc.fHeight = 256; |
26 desc.fSampleCnt = 0; | 25 desc.fSampleCnt = 0; |
(...skipping 26 matching lines...) Expand all Loading... |
53 REPORTER_ASSERT(reporter, !externalTexRT->asRenderTarget()->isSameAs(tex
RT1)); | 52 REPORTER_ASSERT(reporter, !externalTexRT->asRenderTarget()->isSameAs(tex
RT1)); |
54 | 53 |
55 texRT1->unref(); | 54 texRT1->unref(); |
56 texRT2->unref(); | 55 texRT2->unref(); |
57 tex1->unref(); | 56 tex1->unref(); |
58 externalTexRT->unref(); | 57 externalTexRT->unref(); |
59 } | 58 } |
60 } | 59 } |
61 | 60 |
62 #endif | 61 #endif |
OLD | NEW |