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

Side by Side Diff: dm/DM.cpp

Issue 1306823003: skia: add ability to load command_buffer_gles2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make it work with sampleapp Created 5 years, 3 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
OLDNEW
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 #include "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "DMJsonWriter.h" 9 #include "DMJsonWriter.h"
10 #include "DMSrcSink.h" 10 #include "DMSrcSink.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 #else 373 #else
374 return false; 374 return false;
375 #endif 375 #endif
376 } 376 }
377 377
378 static Sink* create_sink(const char* tag) { 378 static Sink* create_sink(const char* tag) {
379 #define SINK(t, sink, ...) if (0 == strcmp(t, tag)) { return new sink(__VA_ARGS_ _); } 379 #define SINK(t, sink, ...) if (0 == strcmp(t, tag)) { return new sink(__VA_ARGS_ _); }
380 if (gpu_supported()) { 380 if (gpu_supported()) {
381 typedef GrContextFactory Gr; 381 typedef GrContextFactory Gr;
382 const GrGLStandard api = get_gpu_api(); 382 const GrGLStandard api = get_gpu_api();
383 SINK("gpunull", GPUSink, Gr::kNull_GLContextType, api, 0, false, F LAGS_gpu_threading); 383 SINK("gpunull", GPUSink, Gr::kNull_GLContextType, api, 0 , false, FLAGS_gpu_threading);
384 SINK("gpudebug", GPUSink, Gr::kDebug_GLContextType, api, 0, false, F LAGS_gpu_threading); 384 SINK("gpudebug", GPUSink, Gr::kDebug_GLContextType, api, 0 , false, FLAGS_gpu_threading);
385 SINK("gpu", GPUSink, Gr::kNative_GLContextType, api, 0, false, F LAGS_gpu_threading); 385 SINK("gpu", GPUSink, Gr::kNative_GLContextType, api, 0 , false, FLAGS_gpu_threading);
386 SINK("gpudft", GPUSink, Gr::kNative_GLContextType, api, 0, true, F LAGS_gpu_threading); 386 SINK("gpudft", GPUSink, Gr::kNative_GLContextType, api, 0 , true, FLAGS_gpu_threading);
387 SINK("msaa4", GPUSink, Gr::kNative_GLContextType, api, 4, false, F LAGS_gpu_threading); 387 SINK("msaa4", GPUSink, Gr::kNative_GLContextType, api, 4 , false, FLAGS_gpu_threading);
388 SINK("msaa16", GPUSink, Gr::kNative_GLContextType, api, 16, false, F LAGS_gpu_threading); 388 SINK("msaa16", GPUSink, Gr::kNative_GLContextType, api, 16 , false, FLAGS_gpu_threading);
389 SINK("nvprmsaa4", GPUSink, Gr::kNVPR_GLContextType, api, 4, false, F LAGS_gpu_threading); 389 SINK("nvprmsaa4", GPUSink, Gr::kNVPR_GLContextType, api, 4 , false, FLAGS_gpu_threading);
390 SINK("nvprmsaa16", GPUSink, Gr::kNVPR_GLContextType, api, 16, false, F LAGS_gpu_threading); 390 SINK("nvprmsaa16", GPUSink, Gr::kNVPR_GLContextType, api, 16 , false, FLAGS_gpu_threading);
391 #if SK_ANGLE 391 #if SK_ANGLE
392 SINK("angle", GPUSink, Gr::kANGLE_GLContextType, api, 0, false, F LAGS_gpu_threading); 392 SINK("angle", GPUSink, Gr::kANGLE_GLContextType, api, 0 , false, FLAGS_gpu_threading);
393 #endif
394 #if SK_COMMAND_BUFFER
395 SINK("commandbuffer", GPUSink, Gr::kCommandBuffer_GLContextType, api, 0 , false, FLAGS_gpu_threading);
393 #endif 396 #endif
394 #if SK_MESA 397 #if SK_MESA
395 SINK("mesa", GPUSink, Gr::kMESA_GLContextType, api, 0, false, F LAGS_gpu_threading); 398 SINK("mesa", GPUSink, Gr::kMESA_GLContextType, api, 0 , false, FLAGS_gpu_threading);
396 #endif 399 #endif
397 } 400 }
398 401
399 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 402 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
400 SINK("hwui", HWUISink); 403 SINK("hwui", HWUISink);
401 #endif 404 #endif
402 405
403 if (FLAGS_cpu) { 406 if (FLAGS_cpu) {
404 SINK("565", RasterSink, kRGB_565_SkColorType); 407 SINK("565", RasterSink, kRGB_565_SkColorType);
405 SINK("8888", RasterSink, kN32_SkColorType); 408 SINK("8888", RasterSink, kN32_SkColorType);
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 851 }
849 return 0; 852 return 0;
850 } 853 }
851 854
852 #if !defined(SK_BUILD_FOR_IOS) 855 #if !defined(SK_BUILD_FOR_IOS)
853 int main(int argc, char** argv) { 856 int main(int argc, char** argv) {
854 SkCommandLineFlags::Parse(argc, argv); 857 SkCommandLineFlags::Parse(argc, argv);
855 return dm_main(); 858 return dm_main();
856 } 859 }
857 #endif 860 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698