OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 #include "Test.h" | 8 #include "Test.h" |
9 #if SK_SUPPORT_GPU | 9 #if SK_SUPPORT_GPU |
10 #include "gl/GrGLGpu.h" | 10 #include "gl/GrGLGpu.h" |
11 #include "gl/GLTestContext.h" | 11 #include "gl/GLContext.h" |
12 #include "GrContext.h" | 12 #include "GrContext.h" |
13 #include "SkSurface_Gpu.h" | 13 #include "SkSurface_Gpu.h" |
14 #include "../include/gpu/GrTypes.h" | 14 #include "../include/gpu/GrTypes.h" |
15 #include "../include/private/SkTemplates.h" | 15 #include "../include/private/SkTemplates.h" |
16 | 16 |
17 class TestStorageAllocator { | 17 class TestStorageAllocator { |
18 public: | 18 public: |
19 static GrTextureStorageAllocator::Result allocateTextureStorage(void* ctx, | 19 static GrTextureStorageAllocator::Result allocateTextureStorage(void* ctx, |
20 GrBackendObject texture, unsigned width, unsigned height, GrPixelConfi
g config, | 20 GrBackendObject texture, unsigned width, unsigned height, GrPixelConfi
g config, |
21 const void* srcData, GrSurfaceOrigin) { | 21 const void* srcData, GrSurfaceOrigin) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 grAllocator.fAllocateTextureStorage = &TestStorageAllocator::allocateTexture
Storage; | 100 grAllocator.fAllocateTextureStorage = &TestStorageAllocator::allocateTexture
Storage; |
101 grAllocator.fDeallocateTextureStorage= &TestStorageAllocator::deallocateText
ureStorage; | 101 grAllocator.fDeallocateTextureStorage= &TestStorageAllocator::deallocateText
ureStorage; |
102 grAllocator.fCtx = &allocator; | 102 grAllocator.fCtx = &allocator; |
103 auto surface(SkSurface_Gpu::MakeRenderTarget( | 103 auto surface(SkSurface_Gpu::MakeRenderTarget( |
104 context, SkBudgeted::kNo, SkImageInfo::MakeN32Premul(kWidth, kHeight
), 0, | 104 context, SkBudgeted::kNo, SkImageInfo::MakeN32Premul(kWidth, kHeight
), 0, |
105 NULL, grAllocator)); | 105 NULL, grAllocator)); |
106 REPORTER_ASSERT(reporter, !surface); | 106 REPORTER_ASSERT(reporter, !surface); |
107 } | 107 } |
108 | 108 |
109 #endif | 109 #endif |
OLD | NEW |