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 "GrCaps.h" | 8 #include "GrCaps.h" |
9 #include "GrContextFactory.h" | 9 #include "GrContextFactory.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 SkSurface* createGPUSurface(Request* request) { | 169 SkSurface* createGPUSurface(Request* request) { |
170 GrContext* context = request->fContextFactory->get(GrContextFactory::kNative
_GLContextType, | 170 GrContext* context = request->fContextFactory->get(GrContextFactory::kNative
_GLContextType, |
171 GrContextFactory::kNone_G
LContextOptions); | 171 GrContextFactory::kNone_G
LContextOptions); |
172 int maxRTSize = context->caps()->maxRenderTargetSize(); | 172 int maxRTSize = context->caps()->maxRenderTargetSize(); |
173 SkImageInfo info = SkImageInfo::Make(SkTMin(kImageWidth, maxRTSize), | 173 SkImageInfo info = SkImageInfo::Make(SkTMin(kImageWidth, maxRTSize), |
174 SkTMin(kImageHeight, maxRTSize), | 174 SkTMin(kImageHeight, maxRTSize), |
175 kN32_SkColorType, kPremul_SkAlphaType); | 175 kN32_SkColorType, kPremul_SkAlphaType); |
176 uint32_t flags = 0; | 176 uint32_t flags = 0; |
177 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); | 177 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); |
178 SkSurface* surface = SkSurface::NewRenderTarget(context, SkBudgeted::kNo, in
fo, 0, | 178 SkSurface* surface = SkSurface::NewRenderTarget(context, SkSurface::kNo_Budg
eted, info, 0, |
179 &props); | 179 &props); |
180 return surface; | 180 return surface; |
181 } | 181 } |
182 | 182 |
183 static const size_t kBufferSize = 1024; | 183 static const size_t kBufferSize = 1024; |
184 | 184 |
185 static int process_upload_data(void* cls, enum MHD_ValueKind kind, | 185 static int process_upload_data(void* cls, enum MHD_ValueKind kind, |
186 const char* key, const char* filename, | 186 const char* key, const char* filename, |
187 const char* content_type, const char* transfer_en
coding, | 187 const char* content_type, const char* transfer_en
coding, |
188 const char* data, uint64_t off, size_t size) { | 188 const char* data, uint64_t off, size_t size) { |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 MHD_stop_daemon(daemon); | 791 MHD_stop_daemon(daemon); |
792 return 0; | 792 return 0; |
793 } | 793 } |
794 | 794 |
795 #if !defined SK_BUILD_FOR_IOS | 795 #if !defined SK_BUILD_FOR_IOS |
796 int main(int argc, char** argv) { | 796 int main(int argc, char** argv) { |
797 SkCommandLineFlags::Parse(argc, argv); | 797 SkCommandLineFlags::Parse(argc, argv); |
798 return skiaserve_main(); | 798 return skiaserve_main(); |
799 } | 799 } |
800 #endif | 800 #endif |
OLD | NEW |