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

Side by Side Diff: src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp

Issue 184443003: Add Gpu Tracing to Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Merge fixes 2 Created 6 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 | « src/gpu/gl/GrGpuGL.cpp ('k') | src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Modified from chromium/src/webkit/glue/gl_bindings_skia_cmd_buffer.cc 1 // Modified from chromium/src/webkit/glue/gl_bindings_skia_cmd_buffer.cc
2 2
3 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
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 #include "gl/GrGLExtensions.h" 7 #include "gl/GrGLExtensions.h"
8 #include "gl/GrGLInterface.h" 8 #include "gl/GrGLInterface.h"
9 #include "gl/GrGLUtil.h" 9 #include "gl/GrGLUtil.h"
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 functions->fMapBuffer = glMapBufferOES; 186 functions->fMapBuffer = glMapBufferOES;
187 functions->fUnmapBuffer = glUnmapBufferOES; 187 functions->fUnmapBuffer = glUnmapBufferOES;
188 #else 188 #else
189 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE S"); 189 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE S");
190 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu fferOES"); 190 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu fferOES");
191 #endif 191 #endif
192 192
193 if (extensions.has("GL_EXT_debug_marker")) { 193 if (extensions.has("GL_EXT_debug_marker")) {
194 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAd dress("glInsertEventMarkerEXT"); 194 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAd dress("glInsertEventMarkerEXT");
195 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddr ess("glPushGroupMarkerEXT"); 195 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddr ess("glPushGroupMarkerEXT");
196 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress( "glPopGropuMarkerEXT"); 196 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress( "glPopGroupMarkerEXT");
197 } 197 }
198 198
199 return interface; 199 return interface;
200 } 200 }
201 201
202 static GrGLInterface* create_desktop_interface(GrGLVersion version, 202 static GrGLInterface* create_desktop_interface(GrGLVersion version,
203 const GrGLExtensions& extensions) { 203 const GrGLExtensions& extensions) {
204 // Currently this assumes a 4.4 context or later. Supporting lower GL versio ns would require 204 // Currently this assumes a 4.4 context or later. Supporting lower GL versio ns would require
205 // getting suffixed versions of pointers for supported extensions. 205 // getting suffixed versions of pointers for supported extensions.
206 if (version < GR_GL_VER(4,4)) { 206 if (version < GR_GL_VER(4,4)) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 functions->fGetPathTexGenfv = (GrGLGetPathTexGenfvProc) eglGetProcAddres s("glGetPathTexGenfvNV"); 386 functions->fGetPathTexGenfv = (GrGLGetPathTexGenfvProc) eglGetProcAddres s("glGetPathTexGenfvNV");
387 functions->fIsPointInFillPath = (GrGLIsPointInFillPathProc) eglGetProcAd dress("glIsPointInFillPathNV"); 387 functions->fIsPointInFillPath = (GrGLIsPointInFillPathProc) eglGetProcAd dress("glIsPointInFillPathNV");
388 functions->fIsPointInStrokePath = (GrGLIsPointInStrokePathProc) eglGetPr ocAddress("glIsPointInStrokePathNV"); 388 functions->fIsPointInStrokePath = (GrGLIsPointInStrokePathProc) eglGetPr ocAddress("glIsPointInStrokePathNV");
389 functions->fGetPathLength = (GrGLGetPathLengthProc) eglGetProcAddress("g lGetPathLengthNV"); 389 functions->fGetPathLength = (GrGLGetPathLengthProc) eglGetProcAddress("g lGetPathLengthNV");
390 functions->fPointAlongPath = (GrGLPointAlongPathProc) eglGetProcAddress( "glPointAlongPathNV"); 390 functions->fPointAlongPath = (GrGLPointAlongPathProc) eglGetProcAddress( "glPointAlongPathNV");
391 } 391 }
392 392
393 if (extensions.has("GL_EXT_debug_marker")) { 393 if (extensions.has("GL_EXT_debug_marker")) {
394 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAd dress("glInsertEventMarkerEXT"); 394 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAd dress("glInsertEventMarkerEXT");
395 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddr ess("glPushGroupMarkerEXT"); 395 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddr ess("glPushGroupMarkerEXT");
396 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress( "glPopGropuMarkerEXT"); 396 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress( "glPopGroupMarkerEXT");
397 } 397 }
398 398
399 return interface; 399 return interface;
400 } 400 }
401 401
402 const GrGLInterface* GrGLCreateNativeInterface() { 402 const GrGLInterface* GrGLCreateNativeInterface() {
403 403
404 GrGLGetStringiProc getStringi = (GrGLGetStringiProc) eglGetProcAddress("glGe tStringi"); 404 GrGLGetStringiProc getStringi = (GrGLGetStringiProc) eglGetProcAddress("glGe tStringi");
405 405
406 const char* verStr = reinterpret_cast<const char*>(glGetString(GR_GL_VERSION )); 406 const char* verStr = reinterpret_cast<const char*>(glGetString(GR_GL_VERSION ));
(...skipping 11 matching lines...) Expand all
418 } else if (kGL_GrGLStandard == standard) { 418 } else if (kGL_GrGLStandard == standard) {
419 interface = create_desktop_interface(version, extensions); 419 interface = create_desktop_interface(version, extensions);
420 } 420 }
421 421
422 if (NULL != interface) { 422 if (NULL != interface) {
423 interface->fExtensions.swap(&extensions); 423 interface->fExtensions.swap(&extensions);
424 } 424 }
425 425
426 return interface; 426 return interface;
427 } 427 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698