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

Side by Side Diff: tools/skiaserve/skiaserve.cpp

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/kilobench/kilobench.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/kilobench/kilobench.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698