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

Side by Side Diff: tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp

Issue 2358173002: GN: take over CommandBuffer bot (Closed)
Patch Set: GYP too Created 4 years, 2 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/gpu/GrContextFactory.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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkMutex.h" 9 #include "SkMutex.h"
10 #include "SkOnce.h" 10 #include "SkOnce.h"
11 #include "gl/GrGLInterface.h" 11 #include "gl/GrGLInterface.h"
12 #include "gl/GrGLAssembleInterface.h" 12 #include "gl/GrGLAssembleInterface.h"
13 #include "gl/command_buffer/GLTestContext_command_buffer.h" 13 #include "gl/command_buffer/GLTestContext_command_buffer.h"
14 #include "../ports/SkOSEnvironment.h" 14 #include "../ports/SkOSEnvironment.h"
15 #include "../ports/SkOSLibrary.h" 15 #include "../ports/SkOSLibrary.h"
16 16
17 #if defined SK_BUILD_FOR_MAC
18
19 // EGL doesn't exist on the mac, so expose what we need to get the command buffe r's EGL running.
20 typedef void *EGLDisplay; 17 typedef void *EGLDisplay;
21 typedef unsigned int EGLBoolean; 18 typedef unsigned int EGLBoolean;
22 typedef void *EGLConfig; 19 typedef void *EGLConfig;
23 typedef void *EGLSurface; 20 typedef void *EGLSurface;
24 typedef void *EGLContext; 21 typedef void *EGLContext;
25 typedef int32_t EGLint; 22 typedef int32_t EGLint;
26 typedef void* EGLNativeDisplayType; 23 typedef void* EGLNativeDisplayType;
27 typedef void* EGLNativeWindowType; 24 typedef void* EGLNativeWindowType;
28 typedef void (*__eglMustCastToProperFunctionPointerType)(void); 25 typedef void (*__eglMustCastToProperFunctionPointerType)(void);
29 #define EGL_FALSE 0 26 #define EGL_FALSE 0
(...skipping 11 matching lines...) Expand all
41 #define EGL_BLUE_SIZE 0x3022 38 #define EGL_BLUE_SIZE 0x3022
42 #define EGL_ALPHA_SIZE 0x3021 39 #define EGL_ALPHA_SIZE 0x3021
43 #define EGL_DEPTH_SIZE 0x3025 40 #define EGL_DEPTH_SIZE 0x3025
44 #define EGL_STENCIL_SIZE 0x3025 41 #define EGL_STENCIL_SIZE 0x3025
45 #define EGL_SAMPLES 0x3031 42 #define EGL_SAMPLES 0x3031
46 #define EGL_SAMPLE_BUFFERS 0x3032 43 #define EGL_SAMPLE_BUFFERS 0x3032
47 #define EGL_NONE 0x3038 44 #define EGL_NONE 0x3038
48 #define EGL_WIDTH 0x3057 45 #define EGL_WIDTH 0x3057
49 #define EGL_HEIGHT 0x3056 46 #define EGL_HEIGHT 0x3056
50 47
51 #else
52
53 #include <EGL/egl.h>
54
55 #endif
56
57 typedef EGLDisplay (*GetDisplayProc)(EGLNativeDisplayType display_id); 48 typedef EGLDisplay (*GetDisplayProc)(EGLNativeDisplayType display_id);
58 typedef EGLBoolean (*InitializeProc)(EGLDisplay dpy, EGLint *major, EGLint *mino r); 49 typedef EGLBoolean (*InitializeProc)(EGLDisplay dpy, EGLint *major, EGLint *mino r);
59 typedef EGLBoolean (*TerminateProc)(EGLDisplay dpy); 50 typedef EGLBoolean (*TerminateProc)(EGLDisplay dpy);
60 typedef EGLBoolean (*ChooseConfigProc)(EGLDisplay dpy, const EGLint* attrib_list , EGLConfig* configs, EGLint config_size, EGLint* num_config); 51 typedef EGLBoolean (*ChooseConfigProc)(EGLDisplay dpy, const EGLint* attrib_list , EGLConfig* configs, EGLint config_size, EGLint* num_config);
61 typedef EGLBoolean (*GetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint a ttribute, EGLint* value); 52 typedef EGLBoolean (*GetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint a ttribute, EGLint* value);
62 typedef EGLSurface (*CreateWindowSurfaceProc)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list); 53 typedef EGLSurface (*CreateWindowSurfaceProc)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list);
63 typedef EGLSurface (*CreatePbufferSurfaceProc)(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list); 54 typedef EGLSurface (*CreatePbufferSurfaceProc)(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list);
64 typedef EGLBoolean (*DestroySurfaceProc)(EGLDisplay dpy, EGLSurface surface); 55 typedef EGLBoolean (*DestroySurfaceProc)(EGLDisplay dpy, EGLSurface surface);
65 typedef EGLContext (*CreateContextProc)(EGLDisplay dpy, EGLConfig config, EGLCon text share_context, const EGLint* attrib_list); 56 typedef EGLContext (*CreateContextProc)(EGLDisplay dpy, EGLConfig config, EGLCon text share_context, const EGLint* attrib_list);
66 typedef EGLBoolean (*DestroyContextProc)(EGLDisplay dpy, EGLContext ctx); 57 typedef EGLBoolean (*DestroyContextProc)(EGLDisplay dpy, EGLContext ctx);
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 return result; 328 return result;
338 } 329 }
339 330
340 int CommandBufferGLTestContext::getSampleCount() { 331 int CommandBufferGLTestContext::getSampleCount() {
341 EGLint result = 0; 332 EGLint result = 0;
342 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &r esult); 333 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &r esult);
343 return result; 334 return result;
344 } 335 }
345 336
346 } // namespace sk_gpu_test 337 } // namespace sk_gpu_test
OLDNEW
« no previous file with comments | « tools/gpu/GrContextFactory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698