diff options
Diffstat (limited to 'libs')
88 files changed, 1704 insertions, 5762 deletions
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp index 237c1e970b17..9f4a6193b434 100644 --- a/libs/androidfw/ApkAssets.cpp +++ b/libs/androidfw/ApkAssets.cpp @@ -134,7 +134,7 @@ std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl( } if (entry.method == kCompressDeflated) { - LOG(WARNING) << kResourcesArsc << " in APK '" << path << "' is compressed."; + ANDROID_LOG(WARNING) << kResourcesArsc << " in APK '" << path << "' is compressed."; } // Open the resource table via mmap unless it is compressed. This logic is taken care of by Open. diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp index 9a95fdf80cb5..92125c9da8bb 100644 --- a/libs/androidfw/Asset.cpp +++ b/libs/androidfw/Asset.cpp @@ -253,8 +253,10 @@ Asset::Asset(void) pAsset = new _FileAsset; result = pAsset->openChunk(NULL, fd, offset, length); - if (result != NO_ERROR) + if (result != NO_ERROR) { + delete pAsset; return NULL; + } pAsset->mAccessMode = mode; return pAsset; @@ -273,8 +275,10 @@ Asset::Asset(void) pAsset = new _CompressedAsset; result = pAsset->openChunk(fd, offset, compressionMethod, uncompressedLen, compressedLen); - if (result != NO_ERROR) + if (result != NO_ERROR) { + delete pAsset; return NULL; + } pAsset->mAccessMode = mode; return pAsset; @@ -328,8 +332,10 @@ Asset::Asset(void) pAsset = new _CompressedAsset; result = pAsset->openChunk(dataMap, uncompressedLen); - if (result != NO_ERROR) + if (result != NO_ERROR) { + delete pAsset; return NULL; + } pAsset->mAccessMode = mode; return pAsset; diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index d20aecaaf0f6..01caf011f644 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -22,10 +22,10 @@ #include <iterator> #include <map> #include <set> -#include <sstream> #include "android-base/logging.h" #include "android-base/stringprintf.h" +#include "androidfw/Util.h" #include "utils/ByteOrder.h" #include "utils/Trace.h" @@ -35,12 +35,6 @@ #endif #endif -#ifdef __ANDROID__ -#define ANDROID_LOG(x) LOG(x) -#else -#define ANDROID_LOG(x) std::stringstream() -#endif - #include "androidfw/ResourceUtils.h" namespace android { diff --git a/libs/androidfw/CursorWindow.cpp b/libs/androidfw/CursorWindow.cpp index e1067fcd4d3d..6f05cbd0ebb3 100644 --- a/libs/androidfw/CursorWindow.cpp +++ b/libs/androidfw/CursorWindow.cpp @@ -69,7 +69,7 @@ status_t CursorWindow::create(const String8& name, size_t size, CursorWindow** o result = window->clear(); if (!result) { LOG_WINDOW("Created new CursorWindow: freeOffset=%d, " - "numRows=%d, numColumns=%d, mSize=%d, mData=%p", + "numRows=%d, numColumns=%d, mSize=%zu, mData=%p", window->mHeader->freeOffset, window->mHeader->numRows, window->mHeader->numColumns, @@ -124,7 +124,7 @@ status_t CursorWindow::createFromParcel(Parcel* parcel, CursorWindow** outCursor CursorWindow* window = new CursorWindow(name, dupAshmemFd, data, size, true /*readOnly*/); LOG_WINDOW("Created CursorWindow from parcel: freeOffset=%d, " - "numRows=%d, numColumns=%d, mSize=%d, mData=%p", + "numRows=%d, numColumns=%d, mSize=%zu, mData=%p", window->mHeader->freeOffset, window->mHeader->numRows, window->mHeader->numColumns, @@ -200,7 +200,7 @@ status_t CursorWindow::allocRow() { FieldSlot* fieldDir = static_cast<FieldSlot*>(offsetToPtr(fieldDirOffset)); memset(fieldDir, 0, fieldDirSize); - LOG_WINDOW("Allocated row %u, rowSlot is at offset %u, fieldDir is %d bytes at offset %u\n", + LOG_WINDOW("Allocated row %u, rowSlot is at offset %u, fieldDir is %zu bytes at offset %u\n", mHeader->numRows - 1, offsetFromPtr(rowSlot), fieldDirSize, fieldDirOffset); rowSlot->offset = fieldDirOffset; return OK; diff --git a/libs/androidfw/include/androidfw/Util.h b/libs/androidfw/include/androidfw/Util.h index aa1466fde778..9a3646b49db8 100644 --- a/libs/androidfw/include/androidfw/Util.h +++ b/libs/androidfw/include/androidfw/Util.h @@ -19,12 +19,19 @@ #include <cstdlib> #include <memory> +#include <sstream> #include <vector> #include "android-base/macros.h" #include "androidfw/StringPiece.h" +#ifdef __ANDROID__ +#define ANDROID_LOG(x) LOG(x) +#else +#define ANDROID_LOG(x) std::stringstream() +#endif + namespace android { namespace util { diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp index ebba4cb79dfb..0d837f2c7fed 100644 --- a/libs/hwui/Android.bp +++ b/libs/hwui/Android.bp @@ -33,11 +33,6 @@ cc_defaults { include_dirs: [ "external/skia/include/private", "external/skia/src/core", - "external/skia/src/effects", - "external/skia/src/image", - "external/skia/src/utils", - "external/skia/src/gpu", - "external/skia/src/shaders", ], product_variables: { @@ -47,33 +42,69 @@ cc_defaults { }, }, }, + + target: { + android: { + include_dirs: [ + "external/skia/src/effects", + "external/skia/src/image", + "external/skia/src/utils", + "external/skia/src/gpu", + "external/skia/src/shaders", + ], + }, + host: { + include_dirs: [ + "external/vulkan-headers/include", + "frameworks/native/libs/math/include", + "frameworks/native/libs/ui/include", + ], + cflags: [ + "-Wno-unused-variable", + ], + } + } } cc_defaults { name: "hwui_static_deps", shared_libs: [ - "liblog", - "libcutils", - "libstatslog", - "libutils", - "libEGL", - "libGLESv1_CM", - "libGLESv2", - "libGLESv3", - "libvulkan", - "libui", - "libgui", - "libprotobuf-cpp-lite", + "libbase", "libharfbuzz_ng", - "libft2", "libminikin", - "libandroidfw", - "libcrypto", - "libsync", - ], - static_libs: [ - "libEGL_blobCache", ], + + target: { + android: { + shared_libs: [ + "liblog", + "libcutils", + "libstatslog", + "libutils", + "libEGL", + "libGLESv1_CM", + "libGLESv2", + "libGLESv3", + "libvulkan", + "libui", + "libgui", + "libprotobuf-cpp-lite", + "libft2", + "libandroidfw", + "libcrypto", + "libsync", + ], + static_libs: [ + "libEGL_blobCache", + ], + }, + host: { + static_libs: [ + "libandroidfw", + "libutils", + ], + } + } } cc_defaults { @@ -91,27 +122,6 @@ cc_defaults { ], } -cc_defaults { - name: "hwui_debug", - cflags: ["-include debug/wrap_gles.h"], - srcs: [ - "debug/wrap_gles.cpp", - "debug/DefaultGlesDriver.cpp", - "debug/GlesErrorCheckWrapper.cpp", - "debug/GlesDriver.cpp", - "debug/FatalBaseDriver.cpp", - "debug/NullGlesDriver.cpp", - ], - include_dirs: ["frameworks/native/opengl/libs/GLES2"], -} - -cc_defaults { - name: "hwui_enable_opengl_validation", - defaults: ["hwui_debug"], - cflags: ["-DDEBUG_OPENGL=3"], - include_dirs: ["frameworks/native/opengl/libs/GLES2"], -} - // Build libhwui with PGO by default. // Location of PGO profile data is defined in build/soong/cc/pgo.go // and is separate from hwui. @@ -151,6 +161,13 @@ cc_defaults { whole_static_libs: ["libskia"], srcs: [ + "pipeline/skia/SkiaDisplayList.cpp", + "pipeline/skia/SkiaRecordingCanvas.cpp", + "pipeline/skia/RenderNodeDrawable.cpp", + "pipeline/skia/ReorderBarrierDrawables.cpp", + "renderthread/Frame.cpp", + "renderthread/RenderTask.cpp", + "renderthread/TimeLord.cpp", "hwui/AnimatedImageDrawable.cpp", "hwui/AnimatedImageThread.cpp", "hwui/Bitmap.cpp", @@ -159,114 +176,112 @@ cc_defaults { "hwui/MinikinUtils.cpp", "hwui/PaintImpl.cpp", "hwui/Typeface.cpp", - "pipeline/skia/GLFunctorDrawable.cpp", - "pipeline/skia/LayerDrawable.cpp", - "pipeline/skia/RenderNodeDrawable.cpp", - "pipeline/skia/ReorderBarrierDrawables.cpp", - "pipeline/skia/ShaderCache.cpp", - "pipeline/skia/SkiaDisplayList.cpp", - "pipeline/skia/SkiaMemoryTracer.cpp", - "pipeline/skia/SkiaOpenGLPipeline.cpp", - "pipeline/skia/SkiaPipeline.cpp", - "pipeline/skia/SkiaProfileRenderer.cpp", - "pipeline/skia/SkiaRecordingCanvas.cpp", - "pipeline/skia/SkiaVulkanPipeline.cpp", - "pipeline/skia/VectorDrawableAtlas.cpp", - "pipeline/skia/VkFunctorDrawable.cpp", - "pipeline/skia/VkInteropFunctorDrawable.cpp", - "renderstate/RenderState.cpp", - "renderthread/CacheManager.cpp", - "renderthread/CanvasContext.cpp", - "renderthread/DrawFrameTask.cpp", - "renderthread/EglManager.cpp", - "renderthread/ReliableSurface.cpp", - "renderthread/VulkanManager.cpp", - "renderthread/VulkanSurface.cpp", - "renderthread/RenderProxy.cpp", - "renderthread/RenderTask.cpp", - "renderthread/RenderThread.cpp", - "renderthread/TimeLord.cpp", - "renderthread/Frame.cpp", - "service/GraphicsStatsService.cpp", - "surfacetexture/EGLConsumer.cpp", - "surfacetexture/ImageConsumer.cpp", - "surfacetexture/SurfaceTexture.cpp", - "thread/CommonPool.cpp", "utils/Blur.cpp", "utils/Color.cpp", - "utils/GLUtils.cpp", "utils/LinearAllocator.cpp", - "utils/StringUtils.cpp", "utils/VectorDrawableUtils.cpp", "AnimationContext.cpp", "Animator.cpp", "AnimatorManager.cpp", "CanvasTransform.cpp", "DamageAccumulator.cpp", - "DeferredLayerUpdater.cpp", - "DeviceInfo.cpp", - "FrameInfo.cpp", - "FrameInfoVisualizer.cpp", - "GpuMemoryTracker.cpp", - "HardwareBitmapUploader.cpp", - "HWUIProperties.sysprop", "Interpolator.cpp", - "JankTracker.cpp", - "Layer.cpp", - "LayerUpdateQueue.cpp", + "LightingInfo.cpp", "Matrix.cpp", "PathParser.cpp", - "ProfileData.cpp", - "ProfileDataContainer.cpp", "Properties.cpp", "PropertyValuesAnimatorSet.cpp", "PropertyValuesHolder.cpp", - "Readback.cpp", "RecordingCanvas.cpp", "RenderNode.cpp", "RenderProperties.cpp", + "RootRenderNode.cpp", "SkiaCanvas.cpp", - "TreeInfo.cpp", - "WebViewFunctorManager.cpp", "VectorDrawable.cpp", - "protos/graphicsstats.proto", ], - // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed. - cflags: ["-Wno-implicit-fallthrough"], - proto: { export_proto_headers: true, }, export_include_dirs: ["."], + + target: { + android: { + + srcs: [ + "pipeline/skia/GLFunctorDrawable.cpp", + "pipeline/skia/LayerDrawable.cpp", + "pipeline/skia/ShaderCache.cpp", + "pipeline/skia/SkiaMemoryTracer.cpp", + "pipeline/skia/SkiaOpenGLPipeline.cpp", + "pipeline/skia/SkiaPipeline.cpp", + "pipeline/skia/SkiaProfileRenderer.cpp", + "pipeline/skia/SkiaVulkanPipeline.cpp", + "pipeline/skia/VectorDrawableAtlas.cpp", + "pipeline/skia/VkFunctorDrawable.cpp", + "pipeline/skia/VkInteropFunctorDrawable.cpp", + "renderstate/RenderState.cpp", + "renderthread/CacheManager.cpp", + "renderthread/CanvasContext.cpp", + "renderthread/DrawFrameTask.cpp", + "renderthread/EglManager.cpp", + "renderthread/ReliableSurface.cpp", + "renderthread/VulkanManager.cpp", + "renderthread/VulkanSurface.cpp", + "renderthread/RenderProxy.cpp", + "renderthread/RenderThread.cpp", + "service/GraphicsStatsService.cpp", + "surfacetexture/EGLConsumer.cpp", + "surfacetexture/ImageConsumer.cpp", + "surfacetexture/SurfaceTexture.cpp", + "thread/CommonPool.cpp", + "utils/GLUtils.cpp", + "utils/StringUtils.cpp", + "DeferredLayerUpdater.cpp", + "DeviceInfo.cpp", + "FrameInfo.cpp", + "FrameInfoVisualizer.cpp", + "GpuMemoryTracker.cpp", + "HardwareBitmapUploader.cpp", + "HWUIProperties.sysprop", + "JankTracker.cpp", + "Layer.cpp", + "LayerUpdateQueue.cpp", + "ProfileData.cpp", + "ProfileDataContainer.cpp", + "Readback.cpp", + "TreeInfo.cpp", + "WebViewFunctorManager.cpp", + "protos/graphicsstats.proto", + ], + + // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed. + cflags: ["-Wno-implicit-fallthrough"], + }, + host: { + srcs: [ + "utils/HostColorSpace.cpp", + ], + export_static_lib_headers: [ + "libarect", + ], + } + } } cc_library { name: "libhwui", + host_supported: true, defaults: [ "libhwui_defaults", - - // Enables fine-grained GLES error checking - // If enabled, every GLES call is wrapped & error checked - // Has moderate overhead - //"hwui_enable_opengl_validation", ], } -// ------------------------ -// static library null gpu -// ------------------------ - cc_library_static { - name: "libhwui_static_debug", + name: "libhwui_static", defaults: [ "libhwui_defaults", - "hwui_debug", - ], - cflags: ["-DHWUI_NULL_GPU"], - srcs: [ - "debug/nullegl.cpp", ], } @@ -294,15 +309,11 @@ cc_test { static_libs: [ "libgmock", - "libhwui_static_debug", + "libhwui_static", ], shared_libs: [ "libmemunreachable", ], - cflags: [ - "-include debug/wrap_gles.h", - "-DHWUI_NULL_GPU", - ], srcs: [ "tests/unit/main.cpp", @@ -346,8 +357,7 @@ cc_benchmark { name: "hwuimacro", defaults: ["hwui_test_defaults"], - // set to libhwui_static_debug to skip actual GL commands - whole_static_libs: ["libhwui"], + static_libs: ["libhwui"], shared_libs: [ "libmemunreachable", ], @@ -366,12 +376,7 @@ cc_benchmark { name: "hwuimicro", defaults: ["hwui_test_defaults"], - cflags: [ - "-include debug/wrap_gles.h", - "-DHWUI_NULL_GPU", - ], - - whole_static_libs: ["libhwui_static_debug"], + static_libs: ["libhwui_static"], shared_libs: [ "libmemunreachable", ], diff --git a/libs/hwui/AndroidTest.xml b/libs/hwui/AndroidTest.xml index eab32c5a67ce..381fb9f6c7bf 100644 --- a/libs/hwui/AndroidTest.xml +++ b/libs/hwui/AndroidTest.xml @@ -28,9 +28,11 @@ <test class="com.android.tradefed.testtype.GoogleBenchmarkTest" > <option name="native-benchmark-device-path" value="/data/benchmarktest" /> <option name="benchmark-module-name" value="hwuimicro" /> + <option name="file-exclusion-filter-regex" value=".*\.config$" /> </test> <test class="com.android.tradefed.testtype.GoogleBenchmarkTest" > <option name="native-benchmark-device-path" value="/data/benchmarktest" /> <option name="benchmark-module-name" value="hwuimacro" /> + <option name="file-exclusion-filter-regex" value=".*\.config$" /> </test> </configuration> diff --git a/libs/hwui/CanvasTransform.cpp b/libs/hwui/CanvasTransform.cpp index 0cfaa8c61279..8c37d73366c2 100644 --- a/libs/hwui/CanvasTransform.cpp +++ b/libs/hwui/CanvasTransform.cpp @@ -100,9 +100,9 @@ static void applyColorTransform(ColorTransform transform, SkPaint& paint) { SkBlendMode mode; SkColor color; // TODO: LRU this or something to avoid spamming new color mode filters - if (paint.getColorFilter()->asColorMode(&color, &mode)) { + if (paint.getColorFilter()->asAColorMode(&color, &mode)) { color = transformColor(transform, color); - paint.setColorFilter(SkColorFilter::MakeModeFilter(color, mode)); + paint.setColorFilter(SkColorFilters::Blend(color, mode)); } } } diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp index cca0032b230e..2d2df52073f4 100644 --- a/libs/hwui/DamageAccumulator.cpp +++ b/libs/hwui/DamageAccumulator.cpp @@ -137,20 +137,28 @@ void DamageAccumulator::applyMatrix4Transform(DirtyStack* frame) { mapRect(frame->matrix4, frame->pendingDirty, &mHead->pendingDirty); } -static inline void mapRect(const RenderProperties& props, const SkRect& in, SkRect* out) { - if (in.isEmpty()) return; - const SkMatrix* transform = props.getTransformMatrix(); - SkRect temp(in); +static inline void applyMatrix(const SkMatrix* transform, SkRect* rect) { if (transform && !transform->isIdentity()) { if (CC_LIKELY(!transform->hasPerspective())) { - transform->mapRect(&temp); + transform->mapRect(rect); } else { // Don't attempt to calculate damage for a perspective transform // as the numbers this works with can break the perspective // calculations. Just give up and expand to DIRTY_MIN/DIRTY_MAX - temp.set(DIRTY_MIN, DIRTY_MIN, DIRTY_MAX, DIRTY_MAX); + rect->set(DIRTY_MIN, DIRTY_MIN, DIRTY_MAX, DIRTY_MAX); } } +} + +static inline void mapRect(const RenderProperties& props, const SkRect& in, SkRect* out) { + if (in.isEmpty()) return; + SkRect temp(in); + applyMatrix(props.getTransformMatrix(), &temp); + if (props.getStaticMatrix()) { + applyMatrix(props.getStaticMatrix(), &temp); + } else if (props.getAnimationMatrix()) { + applyMatrix(props.getAnimationMatrix(), &temp); + } temp.offset(props.getLeft(), props.getTop()); out->join(temp); } diff --git a/libs/hwui/DeferredLayerUpdater.cpp b/libs/hwui/DeferredLayerUpdater.cpp index 3bee3018d36e..f300703e7e00 100644 --- a/libs/hwui/DeferredLayerUpdater.cpp +++ b/libs/hwui/DeferredLayerUpdater.cpp @@ -15,6 +15,9 @@ */ #include "DeferredLayerUpdater.h" +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> + #include "renderstate/RenderState.h" #include "utils/PaintUtils.h" @@ -38,6 +41,16 @@ DeferredLayerUpdater::~DeferredLayerUpdater() { destroyLayer(); } +void DeferredLayerUpdater::setSurfaceTexture(const sp<SurfaceTexture>& consumer) { + if (consumer.get() != mSurfaceTexture.get()) { + mSurfaceTexture = consumer; + + GLenum target = consumer->getCurrentTextureTarget(); + LOG_ALWAYS_FATAL_IF(target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES, + "set unsupported SurfaceTexture with target %x", target); + } +} + void DeferredLayerUpdater::onContextDestroyed() { destroyLayer(); } diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h index a91c111933c4..1491f99402ba 100644 --- a/libs/hwui/DeferredLayerUpdater.h +++ b/libs/hwui/DeferredLayerUpdater.h @@ -24,9 +24,6 @@ #include <system/graphics.h> #include <utils/StrongPointer.h> -#include <GLES2/gl2.h> -#include <GLES2/gl2ext.h> - #include "renderstate/RenderState.h" #include "surfacetexture/SurfaceTexture.h" #include "Layer.h" @@ -67,15 +64,7 @@ public: return false; } - ANDROID_API void setSurfaceTexture(const sp<SurfaceTexture>& consumer) { - if (consumer.get() != mSurfaceTexture.get()) { - mSurfaceTexture = consumer; - - GLenum target = consumer->getCurrentTextureTarget(); - LOG_ALWAYS_FATAL_IF(target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES, - "set unsupported SurfaceTexture with target %x", target); - } - } + ANDROID_API void setSurfaceTexture(const sp<SurfaceTexture>& consumer); ANDROID_API void updateTexImage() { mUpdateTexImage = true; } diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h index 0aab58c38ba0..b75192ff8476 100644 --- a/libs/hwui/FrameInfo.h +++ b/libs/hwui/FrameInfo.h @@ -100,15 +100,15 @@ class FrameInfo { public: void importUiThreadInfo(int64_t* info); - void markSyncStart() { set(FrameInfoIndex::SyncStart) = systemTime(CLOCK_MONOTONIC); } + void markSyncStart() { set(FrameInfoIndex::SyncStart) = systemTime(SYSTEM_TIME_MONOTONIC); } void markIssueDrawCommandsStart() { - set(FrameInfoIndex::IssueDrawCommandsStart) = systemTime(CLOCK_MONOTONIC); + set(FrameInfoIndex::IssueDrawCommandsStart) = systemTime(SYSTEM_TIME_MONOTONIC); } - void markSwapBuffers() { set(FrameInfoIndex::SwapBuffers) = systemTime(CLOCK_MONOTONIC); } + void markSwapBuffers() { set(FrameInfoIndex::SwapBuffers) = systemTime(SYSTEM_TIME_MONOTONIC); } - void markFrameCompleted() { set(FrameInfoIndex::FrameCompleted) = systemTime(CLOCK_MONOTONIC); } + void markFrameCompleted() { set(FrameInfoIndex::FrameCompleted) = systemTime(SYSTEM_TIME_MONOTONIC); } void addFlag(int frameInfoFlag) { set(FrameInfoIndex::Flags) |= static_cast<uint64_t>(frameInfoFlag); diff --git a/libs/hwui/HardwareBitmapUploader.h b/libs/hwui/HardwareBitmapUploader.h index c300593d47a1..72243d23dd35 100644 --- a/libs/hwui/HardwareBitmapUploader.h +++ b/libs/hwui/HardwareBitmapUploader.h @@ -27,7 +27,13 @@ public: static sk_sp<Bitmap> allocateHardwareBitmap(const SkBitmap& sourceBitmap); +#ifdef __ANDROID__ static bool hasFP16Support(); +#else + static bool hasFP16Support() { + return true; + } +#endif }; } // namespace android::uirenderer diff --git a/libs/hwui/debug/DefaultGlesDriver.h b/libs/hwui/LightingInfo.cpp index 8027ea284aaa..83bb255f3c3b 100644 --- a/libs/hwui/debug/DefaultGlesDriver.h +++ b/libs/hwui/LightingInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 The Android Open Source Project + * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,21 +14,18 @@ * limitations under the License. */ -#pragma once +#include "LightingInfo.h" -#include "GlesDriver.h" +#include <float.h> namespace android { namespace uirenderer { -namespace debug { -class DefaultGlesDriver : public GlesDriver { -public: -#define GL_ENTRY(ret, api, ...) virtual ret api##_(__VA_ARGS__) override; -#include "gles_decls.in" -#undef GL_ENTRY -}; +float LightingInfo::mLightRadius = 0; +uint8_t LightingInfo::mAmbientShadowAlpha = 0; +uint8_t LightingInfo::mSpotShadowAlpha = 0; -} // namespace debug -} // namespace uirenderer -} // namespace android +Vector3 LightingInfo::mLightCenter = {FLT_MIN, FLT_MIN, FLT_MIN}; + +} /* namespace uirenderer */ +} /* namespace android */ diff --git a/libs/hwui/LightingInfo.h b/libs/hwui/LightingInfo.h new file mode 100644 index 000000000000..3112eb3e0d73 --- /dev/null +++ b/libs/hwui/LightingInfo.h @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "Lighting.h" +#include "Properties.h" + +namespace android { +namespace uirenderer { + +class LightingInfo { +public: + + static float getLightRadius() { + if (CC_UNLIKELY(Properties::overrideLightRadius > 0)) { + return Properties::overrideLightRadius; + } + return mLightRadius; + } + + static uint8_t getAmbientShadowAlpha() { + if (CC_UNLIKELY(Properties::overrideAmbientShadowStrength >= 0)) { + return Properties::overrideAmbientShadowStrength; + } + return mAmbientShadowAlpha; + } + + static uint8_t getSpotShadowAlpha() { + if (CC_UNLIKELY(Properties::overrideSpotShadowStrength >= 0)) { + return Properties::overrideSpotShadowStrength; + } + return mSpotShadowAlpha; + } + + static Vector3 getLightCenter() { + if (CC_UNLIKELY(Properties::overrideLightPosY > 0 || Properties::overrideLightPosZ > 0)) { + Vector3 adjustedLightCenter = mLightCenter; + if (CC_UNLIKELY(Properties::overrideLightPosY > 0)) { + // negated since this shifts up + adjustedLightCenter.y = -Properties::overrideLightPosY; + } + if (CC_UNLIKELY(Properties::overrideLightPosZ > 0)) { + adjustedLightCenter.z = Properties::overrideLightPosZ; + } + return adjustedLightCenter; + } + return mLightCenter; + } + + static Vector3 getLightCenterRaw() { + return mLightCenter; + } + + static void setLightCenterRaw(const Vector3& lightCenter) { + mLightCenter = lightCenter; + } + + static void updateLighting(const LightGeometry& lightGeometry, const LightInfo& lightInfo) { + mLightRadius = lightGeometry.radius; + mAmbientShadowAlpha = lightInfo.ambientShadowAlpha; + mSpotShadowAlpha = lightInfo.spotShadowAlpha; + mLightCenter = lightGeometry.center; + } +private: + static float mLightRadius; + static uint8_t mAmbientShadowAlpha; + static uint8_t mSpotShadowAlpha; + static Vector3 mLightCenter; +}; + +} /* namespace uirenderer */ +} /* namespace android */ diff --git a/libs/hwui/ProfileData.cpp b/libs/hwui/ProfileData.cpp index 70ca4e3e8074..c7f92321b090 100644 --- a/libs/hwui/ProfileData.cpp +++ b/libs/hwui/ProfileData.cpp @@ -143,7 +143,7 @@ void ProfileData::reset() { mSlowFrameCounts.fill(0); mTotalFrameCount = 0; mJankFrameCount = 0; - mStatStartTime = systemTime(CLOCK_MONOTONIC); + mStatStartTime = systemTime(SYSTEM_TIME_MONOTONIC); } void ProfileData::reportFrame(int64_t duration) { diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp index af20c4f4f20e..4e7df88b8095 100644 --- a/libs/hwui/Properties.cpp +++ b/libs/hwui/Properties.cpp @@ -17,19 +17,32 @@ #include "Properties.h" #include "Debug.h" #include "DeviceInfo.h" +#ifdef __ANDROID__ #include "HWUIProperties.sysprop.h" +#endif #include "SkTraceEventCommon.h" #include <algorithm> #include <cstdlib> +#include <optional> +#include <android-base/properties.h> #include <cutils/compiler.h> -#include <cutils/properties.h> #include <log/log.h> namespace android { namespace uirenderer { +#ifndef __ANDROID__ // Layoutlib does not compile HWUIProperties.sysprop as it depends on cutils properties +std::optional<bool> use_vulkan() { + return base::GetBoolProperty("ro.hwui.use_vulkan", false); +} + +std::optional<std::int32_t> render_ahead() { + return base::GetIntProperty("ro.hwui.render_ahead", 0); +} +#endif + bool Properties::debugLayersUpdates = false; bool Properties::debugOverdraw = false; bool Properties::showDirtyRegions = false; @@ -67,64 +80,54 @@ bool Properties::isolatedProcess = false; int Properties::contextPriority = 0; int Properties::defaultRenderAhead = -1; -static int property_get_int(const char* key, int defaultValue) { - char buf[PROPERTY_VALUE_MAX] = { - '\0', - }; - - if (property_get(key, buf, "") > 0) { - return atoi(buf); - } - return defaultValue; -} - bool Properties::load() { - char property[PROPERTY_VALUE_MAX]; bool prevDebugLayersUpdates = debugLayersUpdates; bool prevDebugOverdraw = debugOverdraw; debugOverdraw = false; - if (property_get(PROPERTY_DEBUG_OVERDRAW, property, nullptr) > 0) { - INIT_LOGD(" Overdraw debug enabled: %s", property); - if (!strcmp(property, "show")) { + std::string debugOverdrawProperty = base::GetProperty(PROPERTY_DEBUG_OVERDRAW, ""); + if (debugOverdrawProperty != "") { + INIT_LOGD(" Overdraw debug enabled: %s", debugOverdrawProperty); + if (debugOverdrawProperty == "show") { debugOverdraw = true; overdrawColorSet = OverdrawColorSet::Default; - } else if (!strcmp(property, "show_deuteranomaly")) { + } else if (debugOverdrawProperty == "show_deuteranomaly") { debugOverdraw = true; overdrawColorSet = OverdrawColorSet::Deuteranomaly; } } sProfileType = ProfileType::None; - if (property_get(PROPERTY_PROFILE, property, "") > 0) { - if (!strcmp(property, PROPERTY_PROFILE_VISUALIZE_BARS)) { + std::string profileProperty = base::GetProperty(PROPERTY_PROFILE, ""); + if (profileProperty != "") { + if (profileProperty == PROPERTY_PROFILE_VISUALIZE_BARS) { sProfileType = ProfileType::Bars; - } else if (!strcmp(property, "true")) { + } else if (profileProperty == "true") { sProfileType = ProfileType::Console; } } - debugLayersUpdates = property_get_bool(PROPERTY_DEBUG_LAYERS_UPDATES, false); + debugLayersUpdates = base::GetBoolProperty(PROPERTY_DEBUG_LAYERS_UPDATES, false); INIT_LOGD(" Layers updates debug enabled: %d", debugLayersUpdates); - showDirtyRegions = property_get_bool(PROPERTY_DEBUG_SHOW_DIRTY_REGIONS, false); + showDirtyRegions = base::GetBoolProperty(PROPERTY_DEBUG_SHOW_DIRTY_REGIONS, false); - debugLevel = (DebugLevel)property_get_int(PROPERTY_DEBUG, kDebugDisabled); + debugLevel = (DebugLevel)base::GetIntProperty(PROPERTY_DEBUG, (int)kDebugDisabled); - skipEmptyFrames = property_get_bool(PROPERTY_SKIP_EMPTY_DAMAGE, true); - useBufferAge = property_get_bool(PROPERTY_USE_BUFFER_AGE, true); - enablePartialUpdates = property_get_bool(PROPERTY_ENABLE_PARTIAL_UPDATES, true); + skipEmptyFrames = base::GetBoolProperty(PROPERTY_SKIP_EMPTY_DAMAGE, true); + useBufferAge = base::GetBoolProperty(PROPERTY_USE_BUFFER_AGE, true); + enablePartialUpdates = base::GetBoolProperty(PROPERTY_ENABLE_PARTIAL_UPDATES, true); - filterOutTestOverhead = property_get_bool(PROPERTY_FILTER_TEST_OVERHEAD, false); + filterOutTestOverhead = base::GetBoolProperty(PROPERTY_FILTER_TEST_OVERHEAD, false); - skpCaptureEnabled = debuggingEnabled && property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false); + skpCaptureEnabled = debuggingEnabled && base::GetBoolProperty(PROPERTY_CAPTURE_SKP_ENABLED, false); SkAndroidFrameworkTraceUtil::setEnableTracing( - property_get_bool(PROPERTY_SKIA_ATRACE_ENABLED, false)); + base::GetBoolProperty(PROPERTY_SKIA_ATRACE_ENABLED, false)); - runningInEmulator = property_get_bool(PROPERTY_QEMU_KERNEL, false); + runningInEmulator = base::GetBoolProperty(PROPERTY_QEMU_KERNEL, false); - defaultRenderAhead = std::max(-1, std::min(2, property_get_int(PROPERTY_RENDERAHEAD, + defaultRenderAhead = std::max(-1, std::min(2, base::GetIntProperty(PROPERTY_RENDERAHEAD, render_ahead().value_or(0)))); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw); @@ -175,9 +178,8 @@ RenderPipelineType Properties::peekRenderPipelineType() { return sRenderPipelineType; } bool useVulkan = use_vulkan().value_or(false); - char prop[PROPERTY_VALUE_MAX]; - property_get(PROPERTY_RENDERER, prop, useVulkan ? "skiavk" : "skiagl"); - if (!strcmp(prop, "skiavk")) { + std::string rendererProperty = base::GetProperty(PROPERTY_RENDERER, useVulkan ? "skiavk" : "skiagl"); + if (rendererProperty == "skiavk") { return RenderPipelineType::SkiaVulkan; } return RenderPipelineType::SkiaGL; @@ -189,14 +191,14 @@ RenderPipelineType Properties::getRenderPipelineType() { } void Properties::overrideRenderPipelineType(RenderPipelineType type) { -#if !defined(HWUI_GLES_WRAP_ENABLED) // If we're doing actual rendering then we can't change the renderer after it's been set. // Unit tests can freely change this as often as it wants, though, as there's no actual // GL rendering happening if (sRenderPipelineType != RenderPipelineType::NotInitialized) { + LOG_ALWAYS_FATAL_IF(sRenderPipelineType != type, + "Trying to change pipeline but it's already set"); return; } -#endif sRenderPipelineType = type; } diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h index 71b07c947716..d3ecb54d94f6 100644 --- a/libs/hwui/Properties.h +++ b/libs/hwui/Properties.h @@ -18,7 +18,6 @@ #define ANDROID_HWUI_PROPERTIES_H #include <cutils/compiler.h> -#include <cutils/properties.h> /** * This file contains the list of system properties used to configure libhwui. diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index b73347b233d7..8aee8f5b1848 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -20,8 +20,12 @@ #include "Debug.h" #include "TreeInfo.h" #include "VectorDrawable.h" -#include "renderstate/RenderState.h" +#ifdef __ANDROID__ #include "renderthread/CanvasContext.h" +#else +#include "DamageAccumulator.h" +#include "pipeline/skia/SkiaDisplayList.h" +#endif #include "utils/FatVector.h" #include "utils/MathUtils.h" #include "utils/StringUtils.h" @@ -161,6 +165,7 @@ void RenderNode::prepareLayer(TreeInfo& info, uint32_t dirtyMask) { } void RenderNode::pushLayerUpdate(TreeInfo& info) { +#ifdef __ANDROID__ // Layoutlib does not support CanvasContext and Layers LayerType layerType = properties().effectiveLayerType(); // If we are not a layer OR we cannot be rendered (eg, view was detached) // we need to destroy any Layers we may have had previously @@ -189,6 +194,7 @@ void RenderNode::pushLayerUpdate(TreeInfo& info) { // That might be us, so tell CanvasContext that this layer is in the // tree and should not be destroyed. info.canvasContext.markLayerInUse(this); +#endif } /** diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h index e6710cc8f950..e9794489f171 100644 --- a/libs/hwui/RenderProperties.h +++ b/libs/hwui/RenderProperties.h @@ -526,9 +526,13 @@ public: } bool fitsOnLayer() const { +#ifdef __ANDROID__ // Layoutlib does not support device info const DeviceInfo* deviceInfo = DeviceInfo::get(); return mPrimitiveFields.mWidth <= deviceInfo->maxTextureSize() && mPrimitiveFields.mHeight <= deviceInfo->maxTextureSize(); +#else + return mPrimitiveFields.mWidth <= 4096 && mPrimitiveFields.mHeight <= 4096; +#endif } bool promotedToLayer() const { diff --git a/libs/hwui/RootRenderNode.cpp b/libs/hwui/RootRenderNode.cpp new file mode 100644 index 000000000000..ddbbf58b3071 --- /dev/null +++ b/libs/hwui/RootRenderNode.cpp @@ -0,0 +1,306 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "RootRenderNode.h" + +#ifdef __ANDROID__ // Layoutlib does not support Looper (windows) +#include <utils/Looper.h> +#endif + +namespace android::uirenderer { + +#ifdef __ANDROID__ // Layoutlib does not support Looper +class FinishAndInvokeListener : public MessageHandler { +public: + explicit FinishAndInvokeListener(PropertyValuesAnimatorSet* anim) : mAnimator(anim) { + mListener = anim->getOneShotListener(); + mRequestId = anim->getRequestId(); + } + + virtual void handleMessage(const Message& message) { + if (mAnimator->getRequestId() == mRequestId) { + // Request Id has not changed, meaning there's no animation lifecyle change since the + // message is posted, so go ahead and call finish to make sure the PlayState is properly + // updated. This is needed because before the next frame comes in from UI thread to + // trigger an animation update, there could be reverse/cancel etc. So we need to update + // the playstate in time to ensure all the subsequent events get chained properly. + mAnimator->end(); + } + mListener->onAnimationFinished(nullptr); + } + +private: + sp<PropertyValuesAnimatorSet> mAnimator; + sp<AnimationListener> mListener; + uint32_t mRequestId; +}; + +void RootRenderNode::prepareTree(TreeInfo& info) { + info.errorHandler = mErrorHandler.get(); + + for (auto& anim : mRunningVDAnimators) { + // Assume that the property change in VD from the animators will not be consumed. Mark + // otherwise if the VDs are found in the display list tree. For VDs that are not in + // the display list tree, we stop providing animation pulses by 1) removing them from + // the animation list, 2) post a delayed message to end them at end time so their + // listeners can receive the corresponding callbacks. + anim->getVectorDrawable()->setPropertyChangeWillBeConsumed(false); + // Mark the VD dirty so it will damage itself during prepareTree. + anim->getVectorDrawable()->markDirty(); + } + if (info.mode == TreeInfo::MODE_FULL) { + for (auto& anim : mPausedVDAnimators) { + anim->getVectorDrawable()->setPropertyChangeWillBeConsumed(false); + anim->getVectorDrawable()->markDirty(); + } + } + // TODO: This is hacky + info.updateWindowPositions = true; + RenderNode::prepareTree(info); + info.updateWindowPositions = false; + info.errorHandler = nullptr; +} + +void RootRenderNode::attachAnimatingNode(RenderNode* animatingNode) { + mPendingAnimatingRenderNodes.push_back(animatingNode); +} + +void RootRenderNode::attachPendingVectorDrawableAnimators() { + mRunningVDAnimators.insert(mPendingVectorDrawableAnimators.begin(), + mPendingVectorDrawableAnimators.end()); + mPendingVectorDrawableAnimators.clear(); +} + +void RootRenderNode::detachAnimators() { + // Remove animators from the list and post a delayed message in future to end the animator + // For infinite animators, remove the listener so we no longer hold a global ref to the AVD + // java object, and therefore the AVD objects in both native and Java can be properly + // released. + for (auto& anim : mRunningVDAnimators) { + detachVectorDrawableAnimator(anim.get()); + anim->clearOneShotListener(); + } + for (auto& anim : mPausedVDAnimators) { + anim->clearOneShotListener(); + } + mRunningVDAnimators.clear(); + mPausedVDAnimators.clear(); +} + +// Move all the animators to the paused list, and send a delayed message to notify the finished +// listener. +void RootRenderNode::pauseAnimators() { + mPausedVDAnimators.insert(mRunningVDAnimators.begin(), mRunningVDAnimators.end()); + for (auto& anim : mRunningVDAnimators) { + detachVectorDrawableAnimator(anim.get()); + } + mRunningVDAnimators.clear(); +} + +void RootRenderNode::doAttachAnimatingNodes(AnimationContext* context) { + for (size_t i = 0; i < mPendingAnimatingRenderNodes.size(); i++) { + RenderNode* node = mPendingAnimatingRenderNodes[i].get(); + context->addAnimatingRenderNode(*node); + } + mPendingAnimatingRenderNodes.clear(); +} + +// Run VectorDrawable animators after prepareTree. +void RootRenderNode::runVectorDrawableAnimators(AnimationContext* context, TreeInfo& info) { + // Push staging. + if (info.mode == TreeInfo::MODE_FULL) { + pushStagingVectorDrawableAnimators(context); + } + + // Run the animators in the running list. + for (auto it = mRunningVDAnimators.begin(); it != mRunningVDAnimators.end();) { + if ((*it)->animate(*context)) { + it = mRunningVDAnimators.erase(it); + } else { + it++; + } + } + + // Run the animators in paused list during full sync. + if (info.mode == TreeInfo::MODE_FULL) { + // During full sync we also need to pulse paused animators, in case their targets + // have been added back to the display list. All the animators that passed the + // scheduled finish time will be removed from the paused list. + for (auto it = mPausedVDAnimators.begin(); it != mPausedVDAnimators.end();) { + if ((*it)->animate(*context)) { + // Animator has finished, remove from the list. + it = mPausedVDAnimators.erase(it); + } else { + it++; + } + } + } + + // Move the animators with a target not in DisplayList to paused list. + for (auto it = mRunningVDAnimators.begin(); it != mRunningVDAnimators.end();) { + if (!(*it)->getVectorDrawable()->getPropertyChangeWillBeConsumed()) { + // Vector Drawable is not in the display list, we should remove this animator from + // the list, put it in the paused list, and post a delayed message to end the + // animator. + detachVectorDrawableAnimator(it->get()); + mPausedVDAnimators.insert(*it); + it = mRunningVDAnimators.erase(it); + } else { + it++; + } + } + + // Move the animators with a target in DisplayList from paused list to running list, and + // trim paused list. + if (info.mode == TreeInfo::MODE_FULL) { + // Check whether any paused animator's target is back in Display List. If so, put the + // animator back in the running list. + for (auto it = mPausedVDAnimators.begin(); it != mPausedVDAnimators.end();) { + if ((*it)->getVectorDrawable()->getPropertyChangeWillBeConsumed()) { + mRunningVDAnimators.insert(*it); + it = mPausedVDAnimators.erase(it); + } else { + it++; + } + } + // Trim paused VD animators at full sync, so that when Java loses reference to an + // animator, we know we won't be requested to animate it any more, then we remove such + // animators from the paused list so they can be properly freed. We also remove the + // animators from paused list when the time elapsed since start has exceeded duration. + trimPausedVDAnimators(context); + } + + info.out.hasAnimations |= !mRunningVDAnimators.empty(); +} + +void RootRenderNode::trimPausedVDAnimators(AnimationContext* context) { + // Trim paused vector drawable animator list. + for (auto it = mPausedVDAnimators.begin(); it != mPausedVDAnimators.end();) { + // Remove paused VD animator if no one else is referencing it. Note that animators that + // have passed scheduled finish time are removed from list when they are being pulsed + // before prepare tree. + // TODO: this is a bit hacky, need to figure out a better way to track when the paused + // animators should be freed. + if ((*it)->getStrongCount() == 1) { + it = mPausedVDAnimators.erase(it); + } else { + it++; + } + } +} + +void RootRenderNode::pushStagingVectorDrawableAnimators(AnimationContext* context) { + for (auto& anim : mRunningVDAnimators) { + anim->pushStaging(*context); + } +} + +void RootRenderNode::destroy() { + for (auto& renderNode : mPendingAnimatingRenderNodes) { + renderNode->animators().endAllStagingAnimators(); + } + mPendingAnimatingRenderNodes.clear(); + mPendingVectorDrawableAnimators.clear(); +} + +void RootRenderNode::addVectorDrawableAnimator(PropertyValuesAnimatorSet* anim) { + mPendingVectorDrawableAnimators.insert(anim); +} + +void RootRenderNode::detachVectorDrawableAnimator(PropertyValuesAnimatorSet* anim) { + if (anim->isInfinite() || !anim->isRunning()) { + // Do not need to post anything if the animation is infinite (i.e. no meaningful + // end listener action), or if the animation has already ended. + return; + } + nsecs_t remainingTimeInMs = anim->getRemainingPlayTime(); + // Post a delayed onFinished event that is scheduled to be handled when the animator ends. + if (anim->getOneShotListener()) { + // VectorDrawable's oneshot listener is updated when there are user triggered animation + // lifecycle changes, such as start(), end(), etc. By using checking and clearing + // one shot listener, we ensure the same end listener event gets posted only once. + // Therefore no duplicates. Another benefit of using one shot listener is that no + // removal is necessary: the end time of animation will not change unless triggered by + // user events, in which case the already posted listener's id will become stale, and + // the onFinished callback will then be ignored. + sp<FinishAndInvokeListener> message = new FinishAndInvokeListener(anim); + auto looper = Looper::getForThread(); + LOG_ALWAYS_FATAL_IF(looper == nullptr, "Not on a looper thread?"); + looper->sendMessageDelayed(ms2ns(remainingTimeInMs), message, 0); + anim->clearOneShotListener(); + } +} + +class AnimationContextBridge : public AnimationContext { +public: + AnimationContextBridge(renderthread::TimeLord& clock, RootRenderNode* rootNode) + : AnimationContext(clock), mRootNode(rootNode) {} + + virtual ~AnimationContextBridge() {} + + // Marks the start of a frame, which will update the frame time and move all + // next frame animations into the current frame + virtual void startFrame(TreeInfo::TraversalMode mode) { + if (mode == TreeInfo::MODE_FULL) { + mRootNode->doAttachAnimatingNodes(this); + mRootNode->attachPendingVectorDrawableAnimators(); + } + AnimationContext::startFrame(mode); + } + + // Runs any animations still left in mCurrentFrameAnimations + virtual void runRemainingAnimations(TreeInfo& info) { + AnimationContext::runRemainingAnimations(info); + mRootNode->runVectorDrawableAnimators(this, info); + } + + virtual void pauseAnimators() override { mRootNode->pauseAnimators(); } + + virtual void callOnFinished(BaseRenderNodeAnimator* animator, AnimationListener* listener) { + listener->onAnimationFinished(animator); + } + + virtual void destroy() { + AnimationContext::destroy(); + mRootNode->detachAnimators(); + } + +private: + sp<RootRenderNode> mRootNode; +}; + +AnimationContext* ContextFactoryImpl::createAnimationContext(renderthread::TimeLord& clock) { + return new AnimationContextBridge(clock, mRootNode); +} +#else + +void RootRenderNode::prepareTree(TreeInfo& info) { + info.errorHandler = mErrorHandler.get(); + info.updateWindowPositions = true; + RenderNode::prepareTree(info); + info.updateWindowPositions = false; + info.errorHandler = nullptr; +} + +void RootRenderNode::attachAnimatingNode(RenderNode* animatingNode) { } + +void RootRenderNode::destroy() { } + +void RootRenderNode::addVectorDrawableAnimator(PropertyValuesAnimatorSet* anim) { } + +#endif + +} // namespace android::uirenderer diff --git a/libs/hwui/RootRenderNode.h b/libs/hwui/RootRenderNode.h new file mode 100644 index 000000000000..12de4ecac94b --- /dev/null +++ b/libs/hwui/RootRenderNode.h @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include <set> +#include <vector> + +#include "AnimationContext.h" +#include "Animator.h" +#include <IContextFactory.h> +#include "PropertyValuesAnimatorSet.h" +#include "RenderNode.h" + +namespace android::uirenderer { + +class ANDROID_API RootRenderNode : public RenderNode { +public: + ANDROID_API explicit RootRenderNode(std::unique_ptr<ErrorHandler> errorHandler) + : RenderNode(), mErrorHandler(std::move(errorHandler)) {} + + ANDROID_API virtual ~RootRenderNode() {} + + virtual void prepareTree(TreeInfo& info) override; + + ANDROID_API void attachAnimatingNode(RenderNode* animatingNode); + + void attachPendingVectorDrawableAnimators(); + + void detachAnimators(); + + void pauseAnimators(); + + void doAttachAnimatingNodes(AnimationContext* context); + + // Run VectorDrawable animators after prepareTree. + void runVectorDrawableAnimators(AnimationContext* context, TreeInfo& info); + + void trimPausedVDAnimators(AnimationContext* context); + + void pushStagingVectorDrawableAnimators(AnimationContext* context); + + ANDROID_API void destroy(); + + ANDROID_API void addVectorDrawableAnimator(PropertyValuesAnimatorSet* anim); + +private: + const std::unique_ptr<ErrorHandler> mErrorHandler; + std::vector<sp<RenderNode> > mPendingAnimatingRenderNodes; + std::set<sp<PropertyValuesAnimatorSet> > mPendingVectorDrawableAnimators; + std::set<sp<PropertyValuesAnimatorSet> > mRunningVDAnimators; + // mPausedVDAnimators stores a list of animators that have not yet passed the finish time, but + // their VectorDrawable targets are no longer in the DisplayList. We skip these animators when + // render thread runs animators independent of UI thread (i.e. RT_ONLY mode). These animators + // need to be re-activated once their VD target is added back into DisplayList. Since that could + // only happen when we do a full sync, we need to make sure to pulse these paused animators at + // full sync. If any animator's VD target is found in DisplayList during a full sync, we move + // the animator back to the running list. + std::set<sp<PropertyValuesAnimatorSet> > mPausedVDAnimators; + + void detachVectorDrawableAnimator(PropertyValuesAnimatorSet* anim); +}; + +#ifdef __ANDROID__ // Layoutlib does not support Animations +class ANDROID_API ContextFactoryImpl : public IContextFactory { +public: + ANDROID_API explicit ContextFactoryImpl(RootRenderNode* rootNode) : mRootNode(rootNode) {} + + ANDROID_API virtual AnimationContext* createAnimationContext( + renderthread::TimeLord& clock) override; + +private: + RootRenderNode* mRootNode; +}; +#endif + +} // namespace android::uirenderer diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index bebda8527def..6ea6af8f2935 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -644,8 +644,7 @@ void SkiaCanvas::drawBitmapMesh(Bitmap& bitmap, int meshWidth, int meshHeight, SkPaint& tmpPaint = paintCoW.writeable(); sk_sp<SkImage> image = bitmap.makeImage(); - sk_sp<SkShader> shader = - image->makeShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); + sk_sp<SkShader> shader = image->makeShader(); tmpPaint.setShader(std::move(shader)); mCanvas->drawVertices(builder.detach(), SkBlendMode::kModulate, diff --git a/libs/hwui/SkiaCanvas.h b/libs/hwui/SkiaCanvas.h index bbe91eb2fbc4..05a6d0dda42d 100644 --- a/libs/hwui/SkiaCanvas.h +++ b/libs/hwui/SkiaCanvas.h @@ -16,7 +16,9 @@ #pragma once #include "CanvasProperty.h" +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration #include "DeferredLayerUpdater.h" +#endif #include "RenderNode.h" #include "VectorDrawable.h" #include "hwui/Canvas.h" @@ -222,16 +224,6 @@ private: void drawPoints(const float* points, int count, const SkPaint& paint, SkCanvas::PointMode mode); - /** Filters the paint for bitmap drawing. - * - * After filtering the paint for bitmap drawing, - * also calls filterPaint on the paint. - * - * @param paint the paint to filter. Will be initialized with the default - * SkPaint before filtering if filtering is required. - */ - PaintCoW&& filterBitmap(PaintCoW&& paint, sk_sp<SkColorFilter> colorSpaceFilter) const; - class Clip; std::unique_ptr<SkCanvas> mCanvasOwned; // might own a canvas we allocated diff --git a/libs/hwui/TEST_MAPPING b/libs/hwui/TEST_MAPPING index d9f2acbb49d2..b1719a979ce5 100644 --- a/libs/hwui/TEST_MAPPING +++ b/libs/hwui/TEST_MAPPING @@ -1,13 +1,15 @@ { "presubmit": [ { - "name": "CtsUiRenderingTestCases" - }, - { "name": "CtsGraphicsTestCases" }, { "name": "CtsAccelerationTestCases" } + ], + "imports": [ + { + "path": "cts/tests/tests/uirendering" + } ] }
\ No newline at end of file diff --git a/libs/hwui/TreeInfo.h b/libs/hwui/TreeInfo.h index 7e8d12fd4597..f2481f83767d 100644 --- a/libs/hwui/TreeInfo.h +++ b/libs/hwui/TreeInfo.h @@ -40,7 +40,6 @@ class ErrorHandler { public: virtual void onError(const std::string& message) = 0; -protected: virtual ~ErrorHandler() = default; }; diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp index 5418b337c371..89ad1b99c6b6 100644 --- a/libs/hwui/VectorDrawable.cpp +++ b/libs/hwui/VectorDrawable.cpp @@ -487,6 +487,7 @@ Bitmap& Tree::getBitmapUpdateIfDirty() { } void Tree::updateCache(sp<skiapipeline::VectorDrawableAtlas>& atlas, GrContext* context) { +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration SkRect dst; sk_sp<SkSurface> surface = mCache.getSurface(&dst); bool canReuseSurface = surface && dst.width() >= mProperties.getScaledWidth() && @@ -514,6 +515,7 @@ void Tree::updateCache(sp<skiapipeline::VectorDrawableAtlas>& atlas, GrContext* } mCache.dirty = false; } +#endif } void Tree::Cache::setAtlas(sp<skiapipeline::VectorDrawableAtlas> newAtlas, @@ -526,6 +528,7 @@ void Tree::Cache::setAtlas(sp<skiapipeline::VectorDrawableAtlas> newAtlas, sk_sp<SkSurface> Tree::Cache::getSurface(SkRect* bounds) { sk_sp<SkSurface> surface; +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration sp<skiapipeline::VectorDrawableAtlas> atlas = mAtlas.promote(); if (atlas.get() && mAtlasKey != INVALID_ATLAS_KEY) { auto atlasEntry = atlas->getEntry(mAtlasKey); @@ -533,17 +536,20 @@ sk_sp<SkSurface> Tree::Cache::getSurface(SkRect* bounds) { surface = atlasEntry.surface; mAtlasKey = atlasEntry.key; } +#endif return surface; } void Tree::Cache::clear() { +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration sp<skiapipeline::VectorDrawableAtlas> lockAtlas = mAtlas.promote(); if (lockAtlas.get()) { lockAtlas->releaseEntry(mAtlasKey); } mAtlas = nullptr; mAtlasKey = INVALID_ATLAS_KEY; +#endif } void Tree::draw(SkCanvas* canvas, const SkRect& bounds, const SkPaint& inPaint) { diff --git a/libs/hwui/WebViewFunctorManager.h b/libs/hwui/WebViewFunctorManager.h index 2846cb1f087b..675b738c6406 100644 --- a/libs/hwui/WebViewFunctorManager.h +++ b/libs/hwui/WebViewFunctorManager.h @@ -17,7 +17,11 @@ #pragma once #include <private/hwui/WebViewFunctor.h> +#ifdef __ANDROID__ // Layoutlib does not support render thread #include <renderthread/RenderProxy.h> +#else +#include <utils/Log.h> +#endif #include <utils/LightRefBase.h> #include <mutex> @@ -34,7 +38,11 @@ public: class Handle : public LightRefBase<Handle> { public: - ~Handle() { renderthread::RenderProxy::destroyFunctor(id()); } + ~Handle() { +#ifdef __ANDROID__ // Layoutlib does not support render thread + renderthread::RenderProxy::destroyFunctor(id()); +#endif + } int id() const { return mReference.id(); } diff --git a/libs/hwui/debug/DefaultGlesDriver.cpp b/libs/hwui/debug/DefaultGlesDriver.cpp deleted file mode 100644 index 46ab20081d17..000000000000 --- a/libs/hwui/debug/DefaultGlesDriver.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "DefaultGlesDriver.h" - -#include "gles_undefine.h" - -#include <EGL/egl.h> - -namespace android { -namespace uirenderer { -namespace debug { - -// Generate the proxy -#define API_ENTRY(x) DefaultGlesDriver::x##_ -#define CALL_GL_API(x, ...) x(__VA_ARGS__); -#define CALL_GL_API_RETURN(x, ...) return x(__VA_ARGS__); - -#include "gles_stubs.in" - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/FatalBaseDriver.cpp b/libs/hwui/debug/FatalBaseDriver.cpp deleted file mode 100644 index ed0f8316d208..000000000000 --- a/libs/hwui/debug/FatalBaseDriver.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "FatalBaseDriver.h" - -#include <log/log.h> - -namespace android { -namespace uirenderer { -namespace debug { - -// Generate the proxy -#define API_ENTRY(x) FatalBaseDriver::x##_ -#define CALL_GL_API(x, ...) LOG_ALWAYS_FATAL("Not Implemented"); -#define CALL_GL_API_RETURN(x, ...) \ - LOG_ALWAYS_FATAL("Not Implemented"); \ - return static_cast<decltype(x(__VA_ARGS__))>(0); - -#include "gles_stubs.in" - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/FatalBaseDriver.h b/libs/hwui/debug/FatalBaseDriver.h deleted file mode 100644 index 45353d0568aa..000000000000 --- a/libs/hwui/debug/FatalBaseDriver.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "GlesDriver.h" - -namespace android { -namespace uirenderer { -namespace debug { - -// A base driver that implements all the pure virtuals in the form of -// LOG_ALWAYS_FATALS. Suitable for selective-override implementations -// where only a known subset of methods need to be overridden -class FatalBaseDriver : public GlesDriver { -public: -#define GL_ENTRY(ret, api, ...) virtual ret api##_(__VA_ARGS__) override; -#include "gles_decls.in" -#undef GL_ENTRY -}; - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/GlesDriver.cpp b/libs/hwui/debug/GlesDriver.cpp deleted file mode 100644 index 98f06b0cb4f0..000000000000 --- a/libs/hwui/debug/GlesDriver.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "GlesDriver.h" -#include "DefaultGlesDriver.h" -#include "GlesErrorCheckWrapper.h" - -namespace android { -namespace uirenderer { -namespace debug { - -static DefaultGlesDriver sDefaultDriver; - -static std::unique_ptr<GlesDriver> sGlesDriver(new GlesErrorCheckWrapper(sDefaultDriver)); - -GlesDriver* GlesDriver::get() { - return sGlesDriver.get(); -} - -std::unique_ptr<GlesDriver> GlesDriver::replace(std::unique_ptr<GlesDriver>&& driver) { - std::unique_ptr<GlesDriver> ret = std::move(sGlesDriver); - sGlesDriver = std::move(driver); - return ret; -} - -sk_sp<const GrGLInterface> GlesDriver::getSkiaInterface() { - sk_sp<const GrGLInterface> skiaInterface(GrGLCreateNativeInterface()); - return skiaInterface; -} - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/GlesDriver.h b/libs/hwui/debug/GlesDriver.h deleted file mode 100644 index 1c77c1a45b82..000000000000 --- a/libs/hwui/debug/GlesDriver.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#ifndef HWUI_GLES_WRAP_ENABLED -#error Wrapping wasn't enabled, can't use this! -#endif - -#include <GLES/gl.h> -#include <GLES/glext.h> -#include <GLES2/gl2.h> -#include <GLES2/gl2ext.h> -#include <GLES3/gl3.h> -#include <GLES3/gl31.h> -#include <GLES3/gl32.h> - -#include <gl/GrGLInterface.h> -#include <memory> - -namespace android { -namespace uirenderer { -namespace debug { - -// All the gl methods on GlesDriver have a trailing underscore -// This is to avoid collision with gles_redefine/gles_undefine -class GlesDriver { -public: - virtual ~GlesDriver() {} - virtual sk_sp<const GrGLInterface> getSkiaInterface(); - -#define GL_ENTRY(ret, api, ...) virtual ret api##_(__VA_ARGS__) = 0; -#include "gles_decls.in" -#undef GL_ENTRY - - static GlesDriver* get(); - static std::unique_ptr<GlesDriver> replace(std::unique_ptr<GlesDriver>&& driver); -}; - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/GlesErrorCheckWrapper.cpp b/libs/hwui/debug/GlesErrorCheckWrapper.cpp deleted file mode 100644 index 8d11c1905da3..000000000000 --- a/libs/hwui/debug/GlesErrorCheckWrapper.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "GlesErrorCheckWrapper.h" - -#include <log/log.h> - -namespace android { -namespace uirenderer { -namespace debug { - -void GlesErrorCheckWrapper::assertNoErrors(const char* apicall) { - GLenum status = GL_NO_ERROR; - GLenum lastError = GL_NO_ERROR; - const char* lastErrorName = nullptr; - while ((status = mBase.glGetError_()) != GL_NO_ERROR) { - lastError = status; - switch (status) { - case GL_INVALID_ENUM: - ALOGE("GL error: GL_INVALID_ENUM"); - lastErrorName = "GL_INVALID_ENUM"; - break; - case GL_INVALID_VALUE: - ALOGE("GL error: GL_INVALID_VALUE"); - lastErrorName = "GL_INVALID_VALUE"; - break; - case GL_INVALID_OPERATION: - ALOGE("GL error: GL_INVALID_OPERATION"); - lastErrorName = "GL_INVALID_OPERATION"; - break; - case GL_OUT_OF_MEMORY: - ALOGE("GL error: Out of memory!"); - lastErrorName = "GL_OUT_OF_MEMORY"; - break; - default: - ALOGE("GL error: 0x%x", status); - lastErrorName = "UNKNOWN"; - } - } - LOG_ALWAYS_FATAL_IF(lastError != GL_NO_ERROR, "%s error! %s (0x%x)", apicall, lastErrorName, - lastError); -} - -#define API_ENTRY(x) GlesErrorCheckWrapper::x##_ -#define CALL_GL_API(x, ...) \ - mBase.x##_(__VA_ARGS__); \ - assertNoErrors(#x) - -#define CALL_GL_API_RETURN(x, ...) \ - auto ret = mBase.x##_(__VA_ARGS__); \ - assertNoErrors(#x); \ - return ret - -#include "gles_stubs.in" - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/GlesErrorCheckWrapper.h b/libs/hwui/debug/GlesErrorCheckWrapper.h deleted file mode 100644 index 791400bf30ec..000000000000 --- a/libs/hwui/debug/GlesErrorCheckWrapper.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "GlesDriver.h" - -namespace android { -namespace uirenderer { -namespace debug { - -class GlesErrorCheckWrapper : public GlesDriver { -public: - explicit GlesErrorCheckWrapper(GlesDriver& base) : mBase(base) {} - -#define GL_ENTRY(ret, api, ...) virtual ret api##_(__VA_ARGS__) override; -#include "gles_decls.in" -#undef GL_ENTRY - -private: - void assertNoErrors(const char* apicall); - - GlesDriver& mBase; -}; - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/MockGlesDriver.h b/libs/hwui/debug/MockGlesDriver.h deleted file mode 100644 index e48ca193d48f..000000000000 --- a/libs/hwui/debug/MockGlesDriver.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "FatalBaseDriver.h" - -#include <gmock/gmock.h> - -namespace android { -namespace uirenderer { -namespace debug { - -class MockGlesDriver : public FatalBaseDriver { -public: - MOCK_METHOD2(glBindBuffer_, void(GLenum target, GLuint buffer)); - MOCK_METHOD4(glBufferData_, - void(GLenum target, GLsizeiptr size, const void* data, GLenum usage)); - MOCK_METHOD2(glGenBuffers_, void(GLsizei n, GLuint* buffers)); -}; - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/NullGlesDriver.cpp b/libs/hwui/debug/NullGlesDriver.cpp deleted file mode 100644 index 212b24290e22..000000000000 --- a/libs/hwui/debug/NullGlesDriver.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <debug/NullGlesDriver.h> - -namespace android { -namespace uirenderer { -namespace debug { - -sk_sp<const GrGLInterface> NullGlesDriver::getSkiaInterface() { - sk_sp<const GrGLInterface> skiaInterface(GrGLCreateNullInterface()); - return skiaInterface; -} - -struct { - GLboolean scissorEnabled; -} gState; - -static void nullglGenCommon(GLsizei n, GLuint* buffers) { - static GLuint nextId = 0; - int i; - for (i = 0; i < n; i++) { - buffers[i] = ++nextId; - } -} - -void NullGlesDriver::glGenBuffers_(GLsizei n, GLuint* buffers) { - nullglGenCommon(n, buffers); -} - -void NullGlesDriver::glGenFramebuffers_(GLsizei n, GLuint* framebuffers) { - nullglGenCommon(n, framebuffers); -} - -void NullGlesDriver::glGenRenderbuffers_(GLsizei n, GLuint* renderbuffers) { - nullglGenCommon(n, renderbuffers); -} - -void NullGlesDriver::glGenTextures_(GLsizei n, GLuint* textures) { - nullglGenCommon(n, textures); -} - -GLuint NullGlesDriver::glCreateProgram_(void) { - static GLuint nextProgram = 0; - return ++nextProgram; -} - -GLuint NullGlesDriver::glCreateShader_(GLenum type) { - static GLuint nextShader = 0; - return ++nextShader; -} - -void NullGlesDriver::glGetProgramiv_(GLuint program, GLenum pname, GLint* params) { - switch (pname) { - case GL_DELETE_STATUS: - case GL_LINK_STATUS: - case GL_VALIDATE_STATUS: - *params = GL_TRUE; - break; - case GL_INFO_LOG_LENGTH: - *params = 16; - break; - } -} - -void NullGlesDriver::glGetProgramInfoLog_(GLuint program, GLsizei bufSize, GLsizei* length, - GLchar* infoLog) { - *length = snprintf(infoLog, bufSize, "success"); - if (*length >= bufSize) { - *length = bufSize - 1; - } -} - -void NullGlesDriver::glGetShaderiv_(GLuint shader, GLenum pname, GLint* params) { - switch (pname) { - case GL_COMPILE_STATUS: - case GL_DELETE_STATUS: - *params = GL_TRUE; - } -} - -void NullGlesDriver::glGetShaderInfoLog_(GLuint shader, GLsizei bufSize, GLsizei* length, - GLchar* infoLog) { - *length = snprintf(infoLog, bufSize, "success"); - if (*length >= bufSize) { - *length = bufSize - 1; - } -} - -void setBooleanState(GLenum cap, GLboolean value) { - switch (cap) { - case GL_SCISSOR_TEST: - gState.scissorEnabled = value; - break; - } -} - -void NullGlesDriver::glEnable_(GLenum cap) { - setBooleanState(cap, GL_TRUE); -} - -void NullGlesDriver::glDisable_(GLenum cap) { - setBooleanState(cap, GL_FALSE); -} - -GLboolean NullGlesDriver::glIsEnabled_(GLenum cap) { - switch (cap) { - case GL_SCISSOR_TEST: - return gState.scissorEnabled; - default: - return GL_FALSE; - } -} - -void NullGlesDriver::glGetIntegerv_(GLenum pname, GLint* data) { - switch (pname) { - case GL_MAX_TEXTURE_SIZE: - *data = 2048; - break; - case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: - *data = 4; - break; - default: - *data = 0; - } -} - -GLenum NullGlesDriver::glCheckFramebufferStatus_(GLenum target) { - switch (target) { - case GL_FRAMEBUFFER: - return GL_FRAMEBUFFER_COMPLETE; - default: - return 0; // error case - } -} - -static const char* getString(GLenum name) { - switch (name) { - case GL_VENDOR: - return "android"; - case GL_RENDERER: - return "null"; - case GL_VERSION: - return "OpenGL ES 2.0 rev1"; - case GL_SHADING_LANGUAGE_VERSION: - return "OpenGL ES GLSL ES 2.0 rev1"; - case GL_EXTENSIONS: - default: - return ""; - } -} - -const GLubyte* NullGlesDriver::glGetString_(GLenum name) { - return (GLubyte*)getString(name); -} - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/NullGlesDriver.h b/libs/hwui/debug/NullGlesDriver.h deleted file mode 100644 index 1a27dbc35299..000000000000 --- a/libs/hwui/debug/NullGlesDriver.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "FatalBaseDriver.h" - -namespace android { -namespace uirenderer { -namespace debug { - -class NullGlesDriver : public FatalBaseDriver { -public: - virtual sk_sp<const GrGLInterface> getSkiaInterface() override; - - virtual void glGenBuffers_(GLsizei n, GLuint* buffers) override; - virtual void glGenFramebuffers_(GLsizei n, GLuint* framebuffers) override; - virtual void glGenRenderbuffers_(GLsizei n, GLuint* renderbuffers) override; - virtual void glGenTextures_(GLsizei n, GLuint* textures) override; - virtual GLuint glCreateProgram_(void) override; - virtual GLuint glCreateShader_(GLenum type) override; - virtual void glGetProgramiv_(GLuint program, GLenum pname, GLint* params) override; - virtual void glGetProgramInfoLog_(GLuint program, GLsizei bufSize, GLsizei* length, - GLchar* infoLog) override; - virtual void glGetShaderiv_(GLuint shader, GLenum pname, GLint* params) override; - virtual void glGetShaderInfoLog_(GLuint shader, GLsizei bufSize, GLsizei* length, - GLchar* infoLog) override; - virtual void glEnable_(GLenum cap) override; - virtual void glDisable_(GLenum cap) override; - virtual GLboolean glIsEnabled_(GLenum cap) override; - virtual void glGetIntegerv_(GLenum pname, GLint* data) override; - virtual const GLubyte* glGetString_(GLenum name) override; - virtual GLenum glCheckFramebufferStatus_(GLenum target) override; - - virtual void glActiveTexture_(GLenum texture) override {} - virtual void glAttachShader_(GLuint program, GLuint shader) override {} - virtual void glBindAttribLocation_(GLuint program, GLuint index, const GLchar* name) override {} - virtual void glBindBuffer_(GLenum target, GLuint buffer) override {} - virtual void glBindFramebuffer_(GLenum target, GLuint framebuffer) override {} - virtual void glBindRenderbuffer_(GLenum target, GLuint renderbuffer) override {} - virtual void glBindTexture_(GLenum target, GLuint texture) override {} - virtual void glBlendColor_(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) override {} - virtual void glBlendEquation_(GLenum mode) override {} - virtual void glBlendEquationSeparate_(GLenum modeRGB, GLenum modeAlpha) override {} - virtual void glBlendFunc_(GLenum sfactor, GLenum dfactor) override {} - virtual void glBlendFuncSeparate_(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, - GLenum dfactorAlpha) override {} - virtual void glBufferData_(GLenum target, GLsizeiptr size, const void* data, - GLenum usage) override {} - virtual void glBufferSubData_(GLenum target, GLintptr offset, GLsizeiptr size, - const void* data) override {} - virtual void glClear_(GLbitfield mask) override {} - virtual void glClearColor_(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) override {} - virtual void glClearDepthf_(GLfloat d) override {} - virtual void glClearStencil_(GLint s) override {} - virtual void glColorMask_(GLboolean red, GLboolean green, GLboolean blue, - GLboolean alpha) override {} - virtual void glCompileShader_(GLuint shader) override {} - virtual void glCompressedTexImage2D_(GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLint border, - GLsizei imageSize, const void* data) override {} - virtual void glCompressedTexSubImage2D_(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const void* data) override {} - virtual void glCopyTexImage2D_(GLenum target, GLint level, GLenum internalformat, GLint x, - GLint y, GLsizei width, GLsizei height, GLint border) override {} - virtual void glCopyTexSubImage2D_(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLint x, GLint y, GLsizei width, GLsizei height) override {} - virtual void glCullFace_(GLenum mode) override {} - virtual void glDeleteBuffers_(GLsizei n, const GLuint* buffers) override {} - virtual void glDeleteFramebuffers_(GLsizei n, const GLuint* framebuffers) override {} - virtual void glDeleteProgram_(GLuint program) override {} - virtual void glDeleteRenderbuffers_(GLsizei n, const GLuint* renderbuffers) override {} - virtual void glDeleteShader_(GLuint shader) override {} - virtual void glDeleteTextures_(GLsizei n, const GLuint* textures) override {} - virtual void glDepthFunc_(GLenum func) override {} - virtual void glDepthMask_(GLboolean flag) override {} - virtual void glDepthRangef_(GLfloat n, GLfloat f) override {} - virtual void glDetachShader_(GLuint program, GLuint shader) override {} - virtual void glDisableVertexAttribArray_(GLuint index) override {} - virtual void glDrawArrays_(GLenum mode, GLint first, GLsizei count) override {} - virtual void glDrawElements_(GLenum mode, GLsizei count, GLenum type, - const void* indices) override {} - virtual void glEnableVertexAttribArray_(GLuint index) override {} - virtual void glFinish_(void) override {} - virtual void glFlush_(void) override {} - virtual void glFramebufferRenderbuffer_(GLenum target, GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer) override {} - virtual void glFramebufferTexture2D_(GLenum target, GLenum attachment, GLenum textarget, - GLuint texture, GLint level) override {} - virtual void glFrontFace_(GLenum mode) override {} - virtual void glGenerateMipmap_(GLenum target) override {} - virtual GLint glGetAttribLocation_(GLuint program, const GLchar* name) override { return 1; } - virtual GLenum glGetError_(void) override { return GL_NO_ERROR; } - virtual GLint glGetUniformLocation_(GLuint program, const GLchar* name) override { return 2; } - virtual void glHint_(GLenum target, GLenum mode) override {} - virtual void glLineWidth_(GLfloat width) override {} - virtual void glLinkProgram_(GLuint program) override {} - virtual void glPixelStorei_(GLenum pname, GLint param) override {} - virtual void glPolygonOffset_(GLfloat factor, GLfloat units) override {} - virtual void glReadPixels_(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, - GLenum type, void* pixels) override {} - virtual void glReleaseShaderCompiler_(void) override {} - virtual void glRenderbufferStorage_(GLenum target, GLenum internalformat, GLsizei width, - GLsizei height) override {} - virtual void glSampleCoverage_(GLfloat value, GLboolean invert) override {} - virtual void glScissor_(GLint x, GLint y, GLsizei width, GLsizei height) override {} - virtual void glShaderBinary_(GLsizei count, const GLuint* shaders, GLenum binaryformat, - const void* binary, GLsizei length) override {} - virtual void glShaderSource_(GLuint shader, GLsizei count, const GLchar* const* string, - const GLint* length) override {} - virtual void glStencilFunc_(GLenum func, GLint ref, GLuint mask) override {} - virtual void glStencilFuncSeparate_(GLenum face, GLenum func, GLint ref, GLuint mask) override { - } - virtual void glStencilMask_(GLuint mask) override {} - virtual void glStencilMaskSeparate_(GLenum face, GLuint mask) override {} - virtual void glStencilOp_(GLenum fail, GLenum zfail, GLenum zpass) override {} - virtual void glStencilOpSeparate_(GLenum face, GLenum sfail, GLenum dpfail, - GLenum dppass) override {} - virtual void glTexImage2D_(GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) override {} - virtual void glTexParameterf_(GLenum target, GLenum pname, GLfloat param) override {} - virtual void glTexParameterfv_(GLenum target, GLenum pname, const GLfloat* params) override {} - virtual void glTexParameteri_(GLenum target, GLenum pname, GLint param) override {} - virtual void glTexParameteriv_(GLenum target, GLenum pname, const GLint* params) override {} - virtual void glTexSubImage2D_(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, GLenum format, GLenum type, - const void* pixels) override {} - virtual void glUniform1f_(GLint location, GLfloat v0) override {} - virtual void glUniform1fv_(GLint location, GLsizei count, const GLfloat* value) override {} - virtual void glUniform1i_(GLint location, GLint v0) override {} - virtual void glUniform1iv_(GLint location, GLsizei count, const GLint* value) override {} - virtual void glUniform2f_(GLint location, GLfloat v0, GLfloat v1) override {} - virtual void glUniform2fv_(GLint location, GLsizei count, const GLfloat* value) override {} - virtual void glUniform2i_(GLint location, GLint v0, GLint v1) override {} - virtual void glUniform2iv_(GLint location, GLsizei count, const GLint* value) override {} - virtual void glUniform3f_(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) override {} - virtual void glUniform3fv_(GLint location, GLsizei count, const GLfloat* value) override {} - virtual void glUniform3i_(GLint location, GLint v0, GLint v1, GLint v2) override {} - virtual void glUniform3iv_(GLint location, GLsizei count, const GLint* value) override {} - virtual void glUniform4f_(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, - GLfloat v3) override {} - virtual void glUniform4fv_(GLint location, GLsizei count, const GLfloat* value) override {} - virtual void glUniform4i_(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) override {} - virtual void glUniform4iv_(GLint location, GLsizei count, const GLint* value) override {} - virtual void glUniformMatrix2fv_(GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) override {} - virtual void glUniformMatrix3fv_(GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) override {} - virtual void glUniformMatrix4fv_(GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) override {} - virtual void glUseProgram_(GLuint program) override {} - virtual void glValidateProgram_(GLuint program) override {} - virtual void glVertexAttrib1f_(GLuint index, GLfloat x) override {} - virtual void glVertexAttrib1fv_(GLuint index, const GLfloat* v) override {} - virtual void glVertexAttrib2f_(GLuint index, GLfloat x, GLfloat y) override {} - virtual void glVertexAttrib2fv_(GLuint index, const GLfloat* v) override {} - virtual void glVertexAttrib3f_(GLuint index, GLfloat x, GLfloat y, GLfloat z) override {} - virtual void glVertexAttrib3fv_(GLuint index, const GLfloat* v) override {} - virtual void glVertexAttrib4f_(GLuint index, GLfloat x, GLfloat y, GLfloat z, - GLfloat w) override {} - virtual void glVertexAttrib4fv_(GLuint index, const GLfloat* v) override {} - virtual void glVertexAttribPointer_(GLuint index, GLint size, GLenum type, GLboolean normalized, - GLsizei stride, const void* pointer) override {} - virtual void glViewport_(GLint x, GLint y, GLsizei width, GLsizei height) override {} - - // gles2 ext - virtual void glInsertEventMarkerEXT_(GLsizei length, const GLchar* marker) override {} - virtual void glPushGroupMarkerEXT_(GLsizei length, const GLchar* marker) override {} - virtual void glPopGroupMarkerEXT_(void) override {} - virtual void glDiscardFramebufferEXT_(GLenum target, GLsizei numAttachments, - const GLenum* attachments) override {} - virtual void glEGLImageTargetTexture2DOES_(GLenum target, GLeglImageOES image) override {} - - // GLES3 - virtual void* glMapBufferRange_(GLenum target, GLintptr offset, GLsizeiptr length, - GLbitfield access) override { - return 0; - } - - virtual GLboolean glUnmapBuffer_(GLenum target) override { return GL_FALSE; } -}; - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/ScopedReplaceDriver.h b/libs/hwui/debug/ScopedReplaceDriver.h deleted file mode 100644 index 110196fb2a01..000000000000 --- a/libs/hwui/debug/ScopedReplaceDriver.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "GlesDriver.h" - -namespace android { -namespace uirenderer { -namespace debug { - -template <typename Driver> -class ScopedReplaceDriver { -public: - ScopedReplaceDriver() { - std::unique_ptr<Driver> glDriver = std::make_unique<Driver>(); - mCurrentDriver = glDriver.get(); - mOldDriver = GlesDriver::replace(std::move(glDriver)); - } - - Driver& get() { return *mCurrentDriver; } - - ~ScopedReplaceDriver() { GlesDriver::replace(std::move(mOldDriver)); } - -private: - std::unique_ptr<GlesDriver> mOldDriver; - Driver* mCurrentDriver; -}; - -} // namespace debug -} // namespace uirenderer -} // namespace android diff --git a/libs/hwui/debug/gles_decls.in b/libs/hwui/debug/gles_decls.in deleted file mode 100644 index 3900959c29de..000000000000 --- a/libs/hwui/debug/gles_decls.in +++ /dev/null @@ -1,543 +0,0 @@ -GL_ENTRY(void, glActiveTexture, GLenum texture) -GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar *name) -GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) -GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer) -GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) -GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) -GL_ENTRY(void, glBlendColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -GL_ENTRY(void, glBlendEquation, GLenum mode) -GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor) -GL_ENTRY(void, glBlendFuncSeparate, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const void *data, GLenum usage) -GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const void *data) -GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target) -GL_ENTRY(void, glClear, GLbitfield mask) -GL_ENTRY(void, glClearColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -GL_ENTRY(void, glClearDepthf, GLfloat d) -GL_ENTRY(void, glClearStencil, GLint s) -GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -GL_ENTRY(void, glCompileShader, GLuint shader) -GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data) -GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data) -GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(GLuint, glCreateProgram, void) -GL_ENTRY(GLuint, glCreateShader, GLenum type) -GL_ENTRY(void, glCullFace, GLenum mode) -GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers) -GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint *framebuffers) -GL_ENTRY(void, glDeleteProgram, GLuint program) -GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint *renderbuffers) -GL_ENTRY(void, glDeleteShader, GLuint shader) -GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures) -GL_ENTRY(void, glDepthFunc, GLenum func) -GL_ENTRY(void, glDepthMask, GLboolean flag) -GL_ENTRY(void, glDepthRangef, GLfloat n, GLfloat f) -GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glDisable, GLenum cap) -GL_ENTRY(void, glDisableVertexAttribArray, GLuint index) -GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) -GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const void *indices) -GL_ENTRY(void, glEnable, GLenum cap) -GL_ENTRY(void, glEnableVertexAttribArray, GLuint index) -GL_ENTRY(void, glFinish, void) -GL_ENTRY(void, glFlush, void) -GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -GL_ENTRY(void, glFrontFace, GLenum mode) -GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers) -GL_ENTRY(void, glGenerateMipmap, GLenum target) -GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint *framebuffers) -GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint *renderbuffers) -GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures) -GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) -GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) -GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders) -GL_ENTRY(GLint, glGetAttribLocation, GLuint program, const GLchar *name) -GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *data) -GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(GLenum, glGetError, void) -GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *data) -GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint *params) -GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *data) -GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint *params) -GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) -GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint *params) -GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) -GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision) -GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) -GL_ENTRY(const GLubyte *, glGetString, GLenum name) -GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat *params) -GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint *params) -GL_ENTRY(GLint, glGetUniformLocation, GLuint program, const GLchar *name) -GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint *params) -GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, void **pointer) -GL_ENTRY(void, glHint, GLenum target, GLenum mode) -GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) -GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) -GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer) -GL_ENTRY(GLboolean, glIsProgram, GLuint program) -GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer) -GL_ENTRY(GLboolean, glIsShader, GLuint shader) -GL_ENTRY(GLboolean, glIsTexture, GLuint texture) -GL_ENTRY(void, glLineWidth, GLfloat width) -GL_ENTRY(void, glLinkProgram, GLuint program) -GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param) -GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units) -GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels) -GL_ENTRY(void, glReleaseShaderCompiler, void) -GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glSampleCoverage, GLfloat value, GLboolean invert) -GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glShaderBinary, GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length) -GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length) -GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilMask, GLuint mask) -GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask) -GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) -GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) -GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) -GL_ENTRY(void, glUniform1f, GLint location, GLfloat v0) -GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glUniform1i, GLint location, GLint v0) -GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glUniform2f, GLint location, GLfloat v0, GLfloat v1) -GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glUniform2i, GLint location, GLint v0, GLint v1) -GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glUniform3f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glUniform3i, GLint location, GLint v0, GLint v1, GLint v2) -GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glUniform4f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glUniform4i, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUseProgram, GLuint program) -GL_ENTRY(void, glValidateProgram, GLuint program) -GL_ENTRY(void, glVertexAttrib1f, GLuint index, GLfloat x) -GL_ENTRY(void, glVertexAttrib1fv, GLuint index, const GLfloat *v) -GL_ENTRY(void, glVertexAttrib2f, GLuint index, GLfloat x, GLfloat y) -GL_ENTRY(void, glVertexAttrib2fv, GLuint index, const GLfloat *v) -GL_ENTRY(void, glVertexAttrib3f, GLuint index, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glVertexAttrib3fv, GLuint index, const GLfloat *v) -GL_ENTRY(void, glVertexAttrib4f, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_ENTRY(void, glVertexAttrib4fv, GLuint index, const GLfloat *v) -GL_ENTRY(void, glVertexAttribPointer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer) -GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glReadBuffer, GLenum src) -GL_ENTRY(void, glDrawRangeElements, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices) -GL_ENTRY(void, glTexImage3D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) -GL_ENTRY(void, glTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels) -GL_ENTRY(void, glCopyTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCompressedTexImage3D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data) -GL_ENTRY(void, glCompressedTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) -GL_ENTRY(void, glGenQueries, GLsizei n, GLuint *ids) -GL_ENTRY(void, glDeleteQueries, GLsizei n, const GLuint *ids) -GL_ENTRY(GLboolean, glIsQuery, GLuint id) -GL_ENTRY(void, glBeginQuery, GLenum target, GLuint id) -GL_ENTRY(void, glEndQuery, GLenum target) -GL_ENTRY(void, glGetQueryiv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetQueryObjectuiv, GLuint id, GLenum pname, GLuint *params) -GL_ENTRY(GLboolean, glUnmapBuffer, GLenum target) -GL_ENTRY(void, glGetBufferPointerv, GLenum target, GLenum pname, void **params) -GL_ENTRY(void, glDrawBuffers, GLsizei n, const GLenum *bufs) -GL_ENTRY(void, glUniformMatrix2x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUniformMatrix3x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUniformMatrix2x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUniformMatrix4x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUniformMatrix3x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUniformMatrix4x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glBlitFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) -GL_ENTRY(void, glRenderbufferStorageMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glFramebufferTextureLayer, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -GL_ENTRY(void *, glMapBufferRange, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) -GL_ENTRY(void, glFlushMappedBufferRange, GLenum target, GLintptr offset, GLsizeiptr length) -GL_ENTRY(void, glBindVertexArray, GLuint array) -GL_ENTRY(void, glDeleteVertexArrays, GLsizei n, const GLuint *arrays) -GL_ENTRY(void, glGenVertexArrays, GLsizei n, GLuint *arrays) -GL_ENTRY(GLboolean, glIsVertexArray, GLuint array) -GL_ENTRY(void, glGetIntegeri_v, GLenum target, GLuint index, GLint *data) -GL_ENTRY(void, glBeginTransformFeedback, GLenum primitiveMode) -GL_ENTRY(void, glEndTransformFeedback, void) -GL_ENTRY(void, glBindBufferRange, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) -GL_ENTRY(void, glBindBufferBase, GLenum target, GLuint index, GLuint buffer) -GL_ENTRY(void, glTransformFeedbackVaryings, GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode) -GL_ENTRY(void, glGetTransformFeedbackVarying, GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) -GL_ENTRY(void, glVertexAttribIPointer, GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer) -GL_ENTRY(void, glGetVertexAttribIiv, GLuint index, GLenum pname, GLint *params) -GL_ENTRY(void, glGetVertexAttribIuiv, GLuint index, GLenum pname, GLuint *params) -GL_ENTRY(void, glVertexAttribI4i, GLuint index, GLint x, GLint y, GLint z, GLint w) -GL_ENTRY(void, glVertexAttribI4ui, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) -GL_ENTRY(void, glVertexAttribI4iv, GLuint index, const GLint *v) -GL_ENTRY(void, glVertexAttribI4uiv, GLuint index, const GLuint *v) -GL_ENTRY(void, glGetUniformuiv, GLuint program, GLint location, GLuint *params) -GL_ENTRY(GLint, glGetFragDataLocation, GLuint program, const GLchar *name) -GL_ENTRY(void, glUniform1ui, GLint location, GLuint v0) -GL_ENTRY(void, glUniform2ui, GLint location, GLuint v0, GLuint v1) -GL_ENTRY(void, glUniform3ui, GLint location, GLuint v0, GLuint v1, GLuint v2) -GL_ENTRY(void, glUniform4ui, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) -GL_ENTRY(void, glUniform1uiv, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glUniform2uiv, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glUniform3uiv, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glUniform4uiv, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glClearBufferiv, GLenum buffer, GLint drawbuffer, const GLint *value) -GL_ENTRY(void, glClearBufferuiv, GLenum buffer, GLint drawbuffer, const GLuint *value) -GL_ENTRY(void, glClearBufferfv, GLenum buffer, GLint drawbuffer, const GLfloat *value) -GL_ENTRY(void, glClearBufferfi, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) -GL_ENTRY(const GLubyte *, glGetStringi, GLenum name, GLuint index) -GL_ENTRY(void, glCopyBufferSubData, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) -GL_ENTRY(void, glGetUniformIndices, GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices) -GL_ENTRY(void, glGetActiveUniformsiv, GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params) -GL_ENTRY(GLuint, glGetUniformBlockIndex, GLuint program, const GLchar *uniformBlockName) -GL_ENTRY(void, glGetActiveUniformBlockiv, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params) -GL_ENTRY(void, glGetActiveUniformBlockName, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) -GL_ENTRY(void, glUniformBlockBinding, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) -GL_ENTRY(void, glDrawArraysInstanced, GLenum mode, GLint first, GLsizei count, GLsizei instancecount) -GL_ENTRY(void, glDrawElementsInstanced, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount) -GL_ENTRY(GLsync, glFenceSync, GLenum condition, GLbitfield flags) -GL_ENTRY(GLboolean, glIsSync, GLsync sync) -GL_ENTRY(void, glDeleteSync, GLsync sync) -GL_ENTRY(GLenum, glClientWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) -GL_ENTRY(void, glWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) -GL_ENTRY(void, glGetInteger64v, GLenum pname, GLint64 *data) -GL_ENTRY(void, glGetSynciv, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) -GL_ENTRY(void, glGetInteger64i_v, GLenum target, GLuint index, GLint64 *data) -GL_ENTRY(void, glGetBufferParameteri64v, GLenum target, GLenum pname, GLint64 *params) -GL_ENTRY(void, glGenSamplers, GLsizei count, GLuint *samplers) -GL_ENTRY(void, glDeleteSamplers, GLsizei count, const GLuint *samplers) -GL_ENTRY(GLboolean, glIsSampler, GLuint sampler) -GL_ENTRY(void, glBindSampler, GLuint unit, GLuint sampler) -GL_ENTRY(void, glSamplerParameteri, GLuint sampler, GLenum pname, GLint param) -GL_ENTRY(void, glSamplerParameteriv, GLuint sampler, GLenum pname, const GLint *param) -GL_ENTRY(void, glSamplerParameterf, GLuint sampler, GLenum pname, GLfloat param) -GL_ENTRY(void, glSamplerParameterfv, GLuint sampler, GLenum pname, const GLfloat *param) -GL_ENTRY(void, glGetSamplerParameteriv, GLuint sampler, GLenum pname, GLint *params) -GL_ENTRY(void, glGetSamplerParameterfv, GLuint sampler, GLenum pname, GLfloat *params) -GL_ENTRY(void, glVertexAttribDivisor, GLuint index, GLuint divisor) -GL_ENTRY(void, glBindTransformFeedback, GLenum target, GLuint id) -GL_ENTRY(void, glDeleteTransformFeedbacks, GLsizei n, const GLuint *ids) -GL_ENTRY(void, glGenTransformFeedbacks, GLsizei n, GLuint *ids) -GL_ENTRY(GLboolean, glIsTransformFeedback, GLuint id) -GL_ENTRY(void, glPauseTransformFeedback, void) -GL_ENTRY(void, glResumeTransformFeedback, void) -GL_ENTRY(void, glGetProgramBinary, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) -GL_ENTRY(void, glProgramBinary, GLuint program, GLenum binaryFormat, const void *binary, GLsizei length) -GL_ENTRY(void, glProgramParameteri, GLuint program, GLenum pname, GLint value) -GL_ENTRY(void, glInvalidateFramebuffer, GLenum target, GLsizei numAttachments, const GLenum *attachments) -GL_ENTRY(void, glInvalidateSubFramebuffer, GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glTexStorage2D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glTexStorage3D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) -GL_ENTRY(void, glGetInternalformativ, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params) -GL_ENTRY(void, glDispatchCompute, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) -GL_ENTRY(void, glDispatchComputeIndirect, GLintptr indirect) -GL_ENTRY(void, glDrawArraysIndirect, GLenum mode, const void *indirect) -GL_ENTRY(void, glDrawElementsIndirect, GLenum mode, GLenum type, const void *indirect) -GL_ENTRY(void, glFramebufferParameteri, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glGetFramebufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetProgramInterfaceiv, GLuint program, GLenum programInterface, GLenum pname, GLint *params) -GL_ENTRY(GLuint, glGetProgramResourceIndex, GLuint program, GLenum programInterface, const GLchar *name) -GL_ENTRY(void, glGetProgramResourceName, GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) -GL_ENTRY(void, glGetProgramResourceiv, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params) -GL_ENTRY(GLint, glGetProgramResourceLocation, GLuint program, GLenum programInterface, const GLchar *name) -GL_ENTRY(void, glUseProgramStages, GLuint pipeline, GLbitfield stages, GLuint program) -GL_ENTRY(void, glActiveShaderProgram, GLuint pipeline, GLuint program) -GL_ENTRY(GLuint, glCreateShaderProgramv, GLenum type, GLsizei count, const GLchar *const*strings) -GL_ENTRY(void, glBindProgramPipeline, GLuint pipeline) -GL_ENTRY(void, glDeleteProgramPipelines, GLsizei n, const GLuint *pipelines) -GL_ENTRY(void, glGenProgramPipelines, GLsizei n, GLuint *pipelines) -GL_ENTRY(GLboolean, glIsProgramPipeline, GLuint pipeline) -GL_ENTRY(void, glGetProgramPipelineiv, GLuint pipeline, GLenum pname, GLint *params) -GL_ENTRY(void, glProgramUniform1i, GLuint program, GLint location, GLint v0) -GL_ENTRY(void, glProgramUniform2i, GLuint program, GLint location, GLint v0, GLint v1) -GL_ENTRY(void, glProgramUniform3i, GLuint program, GLint location, GLint v0, GLint v1, GLint v2) -GL_ENTRY(void, glProgramUniform4i, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -GL_ENTRY(void, glProgramUniform1ui, GLuint program, GLint location, GLuint v0) -GL_ENTRY(void, glProgramUniform2ui, GLuint program, GLint location, GLuint v0, GLuint v1) -GL_ENTRY(void, glProgramUniform3ui, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) -GL_ENTRY(void, glProgramUniform4ui, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) -GL_ENTRY(void, glProgramUniform1f, GLuint program, GLint location, GLfloat v0) -GL_ENTRY(void, glProgramUniform2f, GLuint program, GLint location, GLfloat v0, GLfloat v1) -GL_ENTRY(void, glProgramUniform3f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -GL_ENTRY(void, glProgramUniform4f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -GL_ENTRY(void, glProgramUniform1iv, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniform2iv, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniform3iv, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniform4iv, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniform1uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniform2uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniform3uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniform4uiv, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniform1fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniform2fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniform3fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniform4fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix2x3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix3x2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix2x4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix4x2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix3x4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix4x3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glValidateProgramPipeline, GLuint pipeline) -GL_ENTRY(void, glGetProgramPipelineInfoLog, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) -GL_ENTRY(void, glBindImageTexture, GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) -GL_ENTRY(void, glGetBooleani_v, GLenum target, GLuint index, GLboolean *data) -GL_ENTRY(void, glMemoryBarrier, GLbitfield barriers) -GL_ENTRY(void, glMemoryBarrierByRegion, GLbitfield barriers) -GL_ENTRY(void, glTexStorage2DMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) -GL_ENTRY(void, glGetMultisamplefv, GLenum pname, GLuint index, GLfloat *val) -GL_ENTRY(void, glSampleMaski, GLuint maskNumber, GLbitfield mask) -GL_ENTRY(void, glGetTexLevelParameteriv, GLenum target, GLint level, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexLevelParameterfv, GLenum target, GLint level, GLenum pname, GLfloat *params) -GL_ENTRY(void, glBindVertexBuffer, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) -GL_ENTRY(void, glVertexAttribFormat, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) -GL_ENTRY(void, glVertexAttribIFormat, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) -GL_ENTRY(void, glVertexAttribBinding, GLuint attribindex, GLuint bindingindex) -GL_ENTRY(void, glVertexBindingDivisor, GLuint bindingindex, GLuint divisor) -GL_ENTRY(void, glBlendBarrier, void) -GL_ENTRY(void, glCopyImageSubData, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) -GL_ENTRY(void, glDebugMessageControl, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled) -GL_ENTRY(void, glDebugMessageInsert, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf) -GL_ENTRY(void, glDebugMessageCallback, GLDEBUGPROC callback, const void *userParam) -GL_ENTRY(GLuint, glGetDebugMessageLog, GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) -GL_ENTRY(void, glPushDebugGroup, GLenum source, GLuint id, GLsizei length, const GLchar *message) -GL_ENTRY(void, glPopDebugGroup, void) -GL_ENTRY(void, glObjectLabel, GLenum identifier, GLuint name, GLsizei length, const GLchar *label) -GL_ENTRY(void, glGetObjectLabel, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) -GL_ENTRY(void, glObjectPtrLabel, const void *ptr, GLsizei length, const GLchar *label) -GL_ENTRY(void, glGetObjectPtrLabel, const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) -GL_ENTRY(void, glGetPointerv, GLenum pname, void **params) -GL_ENTRY(void, glEnablei, GLenum target, GLuint index) -GL_ENTRY(void, glDisablei, GLenum target, GLuint index) -GL_ENTRY(void, glBlendEquationi, GLuint buf, GLenum mode) -GL_ENTRY(void, glBlendEquationSeparatei, GLuint buf, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFunci, GLuint buf, GLenum src, GLenum dst) -GL_ENTRY(void, glBlendFuncSeparatei, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glColorMaski, GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) -GL_ENTRY(GLboolean, glIsEnabledi, GLenum target, GLuint index) -GL_ENTRY(void, glDrawElementsBaseVertex, GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) -GL_ENTRY(void, glDrawRangeElementsBaseVertex, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) -GL_ENTRY(void, glDrawElementsInstancedBaseVertex, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex) -GL_ENTRY(void, glFramebufferTexture, GLenum target, GLenum attachment, GLuint texture, GLint level) -GL_ENTRY(void, glPrimitiveBoundingBox, GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) -GL_ENTRY(GLenum, glGetGraphicsResetStatus, void) -GL_ENTRY(void, glReadnPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) -GL_ENTRY(void, glGetnUniformfv, GLuint program, GLint location, GLsizei bufSize, GLfloat *params) -GL_ENTRY(void, glGetnUniformiv, GLuint program, GLint location, GLsizei bufSize, GLint *params) -GL_ENTRY(void, glGetnUniformuiv, GLuint program, GLint location, GLsizei bufSize, GLuint *params) -GL_ENTRY(void, glMinSampleShading, GLfloat value) -GL_ENTRY(void, glPatchParameteri, GLenum pname, GLint value) -GL_ENTRY(void, glTexParameterIiv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexParameterIuiv, GLenum target, GLenum pname, const GLuint *params) -GL_ENTRY(void, glGetTexParameterIiv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexParameterIuiv, GLenum target, GLenum pname, GLuint *params) -GL_ENTRY(void, glSamplerParameterIiv, GLuint sampler, GLenum pname, const GLint *param) -GL_ENTRY(void, glSamplerParameterIuiv, GLuint sampler, GLenum pname, const GLuint *param) -GL_ENTRY(void, glGetSamplerParameterIiv, GLuint sampler, GLenum pname, GLint *params) -GL_ENTRY(void, glGetSamplerParameterIuiv, GLuint sampler, GLenum pname, GLuint *params) -GL_ENTRY(void, glTexBuffer, GLenum target, GLenum internalformat, GLuint buffer) -GL_ENTRY(void, glTexBufferRange, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) -GL_ENTRY(void, glTexStorage3DMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) -GL_ENTRY(void, glBlendBarrierKHR, void) -GL_ENTRY(void, glDebugMessageControlKHR, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled) -GL_ENTRY(void, glDebugMessageInsertKHR, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf) -GL_ENTRY(void, glDebugMessageCallbackKHR, GLDEBUGPROCKHR callback, const void *userParam) -GL_ENTRY(GLuint, glGetDebugMessageLogKHR, GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) -GL_ENTRY(void, glPushDebugGroupKHR, GLenum source, GLuint id, GLsizei length, const GLchar *message) -GL_ENTRY(void, glPopDebugGroupKHR, void) -GL_ENTRY(void, glObjectLabelKHR, GLenum identifier, GLuint name, GLsizei length, const GLchar *label) -GL_ENTRY(void, glGetObjectLabelKHR, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) -GL_ENTRY(void, glObjectPtrLabelKHR, const void *ptr, GLsizei length, const GLchar *label) -GL_ENTRY(void, glGetObjectPtrLabelKHR, const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) -GL_ENTRY(void, glGetPointervKHR, GLenum pname, void **params) -GL_ENTRY(GLenum, glGetGraphicsResetStatusKHR, void) -GL_ENTRY(void, glReadnPixelsKHR, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) -GL_ENTRY(void, glGetnUniformfvKHR, GLuint program, GLint location, GLsizei bufSize, GLfloat *params) -GL_ENTRY(void, glGetnUniformivKHR, GLuint program, GLint location, GLsizei bufSize, GLint *params) -GL_ENTRY(void, glGetnUniformuivKHR, GLuint program, GLint location, GLsizei bufSize, GLuint *params) -GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glCopyImageSubDataOES, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) -GL_ENTRY(void, glEnableiOES, GLenum target, GLuint index) -GL_ENTRY(void, glDisableiOES, GLenum target, GLuint index) -GL_ENTRY(void, glBlendEquationiOES, GLuint buf, GLenum mode) -GL_ENTRY(void, glBlendEquationSeparateiOES, GLuint buf, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFunciOES, GLuint buf, GLenum src, GLenum dst) -GL_ENTRY(void, glBlendFuncSeparateiOES, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glColorMaskiOES, GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) -GL_ENTRY(GLboolean, glIsEnablediOES, GLenum target, GLuint index) -GL_ENTRY(void, glDrawElementsBaseVertexOES, GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) -GL_ENTRY(void, glDrawRangeElementsBaseVertexOES, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) -GL_ENTRY(void, glDrawElementsInstancedBaseVertexOES, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex) -GL_ENTRY(void, glFramebufferTextureOES, GLenum target, GLenum attachment, GLuint texture, GLint level) -GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) -GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const void *binary, GLint length) -GL_ENTRY(void *, glMapBufferOES, GLenum target, GLenum access) -GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) -GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, void **params) -GL_ENTRY(void, glPrimitiveBoundingBoxOES, GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) -GL_ENTRY(void, glMinSampleShadingOES, GLfloat value) -GL_ENTRY(void, glPatchParameteriOES, GLenum pname, GLint value) -GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) -GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels) -GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data) -GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) -GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -GL_ENTRY(void, glTexParameterIivOES, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexParameterIuivOES, GLenum target, GLenum pname, const GLuint *params) -GL_ENTRY(void, glGetTexParameterIivOES, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexParameterIuivOES, GLenum target, GLenum pname, GLuint *params) -GL_ENTRY(void, glSamplerParameterIivOES, GLuint sampler, GLenum pname, const GLint *param) -GL_ENTRY(void, glSamplerParameterIuivOES, GLuint sampler, GLenum pname, const GLuint *param) -GL_ENTRY(void, glGetSamplerParameterIivOES, GLuint sampler, GLenum pname, GLint *params) -GL_ENTRY(void, glGetSamplerParameterIuivOES, GLuint sampler, GLenum pname, GLuint *params) -GL_ENTRY(void, glTexBufferOES, GLenum target, GLenum internalformat, GLuint buffer) -GL_ENTRY(void, glTexBufferRangeOES, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) -GL_ENTRY(void, glTexStorage3DMultisampleOES, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) -GL_ENTRY(void, glTextureViewOES, GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) -GL_ENTRY(void, glBindVertexArrayOES, GLuint array) -GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays) -GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays) -GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array) -GL_ENTRY(void, glDrawArraysInstancedBaseInstanceEXT, GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) -GL_ENTRY(void, glDrawElementsInstancedBaseInstanceEXT, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance) -GL_ENTRY(void, glDrawElementsInstancedBaseVertexBaseInstanceEXT, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) -GL_ENTRY(void, glBindFragDataLocationIndexedEXT, GLuint program, GLuint colorNumber, GLuint index, const GLchar *name) -GL_ENTRY(void, glBindFragDataLocationEXT, GLuint program, GLuint color, const GLchar *name) -GL_ENTRY(GLint, glGetProgramResourceLocationIndexEXT, GLuint program, GLenum programInterface, const GLchar *name) -GL_ENTRY(GLint, glGetFragDataIndexEXT, GLuint program, const GLchar *name) -GL_ENTRY(void, glBufferStorageEXT, GLenum target, GLsizeiptr size, const void *data, GLbitfield flags) -GL_ENTRY(void, glCopyImageSubDataEXT, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) -GL_ENTRY(void, glLabelObjectEXT, GLenum type, GLuint object, GLsizei length, const GLchar *label) -GL_ENTRY(void, glGetObjectLabelEXT, GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) -GL_ENTRY(void, glInsertEventMarkerEXT, GLsizei length, const GLchar *marker) -GL_ENTRY(void, glPushGroupMarkerEXT, GLsizei length, const GLchar *marker) -GL_ENTRY(void, glPopGroupMarkerEXT, void) -GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments) -GL_ENTRY(void, glGenQueriesEXT, GLsizei n, GLuint *ids) -GL_ENTRY(void, glDeleteQueriesEXT, GLsizei n, const GLuint *ids) -GL_ENTRY(GLboolean, glIsQueryEXT, GLuint id) -GL_ENTRY(void, glBeginQueryEXT, GLenum target, GLuint id) -GL_ENTRY(void, glEndQueryEXT, GLenum target) -GL_ENTRY(void, glQueryCounterEXT, GLuint id, GLenum target) -GL_ENTRY(void, glGetQueryivEXT, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetQueryObjectivEXT, GLuint id, GLenum pname, GLint *params) -GL_ENTRY(void, glGetQueryObjectuivEXT, GLuint id, GLenum pname, GLuint *params) -GL_ENTRY(void, glGetQueryObjecti64vEXT, GLuint id, GLenum pname, GLint64 *params) -GL_ENTRY(void, glGetQueryObjectui64vEXT, GLuint id, GLenum pname, GLuint64 *params) -GL_ENTRY(void, glDrawBuffersEXT, GLsizei n, const GLenum *bufs) -GL_ENTRY(void, glEnableiEXT, GLenum target, GLuint index) -GL_ENTRY(void, glDisableiEXT, GLenum target, GLuint index) -GL_ENTRY(void, glBlendEquationiEXT, GLuint buf, GLenum mode) -GL_ENTRY(void, glBlendEquationSeparateiEXT, GLuint buf, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFunciEXT, GLuint buf, GLenum src, GLenum dst) -GL_ENTRY(void, glBlendFuncSeparateiEXT, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glColorMaskiEXT, GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) -GL_ENTRY(GLboolean, glIsEnablediEXT, GLenum target, GLuint index) -GL_ENTRY(void, glDrawElementsBaseVertexEXT, GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) -GL_ENTRY(void, glDrawRangeElementsBaseVertexEXT, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) -GL_ENTRY(void, glDrawElementsInstancedBaseVertexEXT, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex) -GL_ENTRY(void, glMultiDrawElementsBaseVertexEXT, GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex) -GL_ENTRY(void, glDrawArraysInstancedEXT, GLenum mode, GLint start, GLsizei count, GLsizei primcount) -GL_ENTRY(void, glDrawElementsInstancedEXT, GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount) -GL_ENTRY(void, glFramebufferTextureEXT, GLenum target, GLenum attachment, GLuint texture, GLint level) -GL_ENTRY(void, glVertexAttribDivisorEXT, GLuint index, GLuint divisor) -GL_ENTRY(void *, glMapBufferRangeEXT, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) -GL_ENTRY(void, glFlushMappedBufferRangeEXT, GLenum target, GLintptr offset, GLsizeiptr length) -GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount) -GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount) -GL_ENTRY(void, glMultiDrawArraysIndirectEXT, GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride) -GL_ENTRY(void, glMultiDrawElementsIndirectEXT, GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride) -GL_ENTRY(void, glRenderbufferStorageMultisampleEXT, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glFramebufferTexture2DMultisampleEXT, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) -GL_ENTRY(void, glReadBufferIndexedEXT, GLenum src, GLint index) -GL_ENTRY(void, glDrawBuffersIndexedEXT, GLint n, const GLenum *location, const GLint *indices) -GL_ENTRY(void, glGetIntegeri_vEXT, GLenum target, GLuint index, GLint *data) -GL_ENTRY(void, glPrimitiveBoundingBoxEXT, GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) -GL_ENTRY(void, glRasterSamplesEXT, GLuint samples, GLboolean fixedsamplelocations) -GL_ENTRY(GLenum, glGetGraphicsResetStatusEXT, void) -GL_ENTRY(void, glReadnPixelsEXT, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) -GL_ENTRY(void, glGetnUniformfvEXT, GLuint program, GLint location, GLsizei bufSize, GLfloat *params) -GL_ENTRY(void, glGetnUniformivEXT, GLuint program, GLint location, GLsizei bufSize, GLint *params) -GL_ENTRY(void, glActiveShaderProgramEXT, GLuint pipeline, GLuint program) -GL_ENTRY(void, glBindProgramPipelineEXT, GLuint pipeline) -GL_ENTRY(GLuint, glCreateShaderProgramvEXT, GLenum type, GLsizei count, const GLchar **strings) -GL_ENTRY(void, glDeleteProgramPipelinesEXT, GLsizei n, const GLuint *pipelines) -GL_ENTRY(void, glGenProgramPipelinesEXT, GLsizei n, GLuint *pipelines) -GL_ENTRY(void, glGetProgramPipelineInfoLogEXT, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) -GL_ENTRY(void, glGetProgramPipelineivEXT, GLuint pipeline, GLenum pname, GLint *params) -GL_ENTRY(GLboolean, glIsProgramPipelineEXT, GLuint pipeline) -GL_ENTRY(void, glProgramParameteriEXT, GLuint program, GLenum pname, GLint value) -GL_ENTRY(void, glProgramUniform1fEXT, GLuint program, GLint location, GLfloat v0) -GL_ENTRY(void, glProgramUniform1fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniform1iEXT, GLuint program, GLint location, GLint v0) -GL_ENTRY(void, glProgramUniform1ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniform2fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1) -GL_ENTRY(void, glProgramUniform2fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniform2iEXT, GLuint program, GLint location, GLint v0, GLint v1) -GL_ENTRY(void, glProgramUniform2ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniform3fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -GL_ENTRY(void, glProgramUniform3fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniform3iEXT, GLuint program, GLint location, GLint v0, GLint v1, GLint v2) -GL_ENTRY(void, glProgramUniform3ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniform4fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -GL_ENTRY(void, glProgramUniform4fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value) -GL_ENTRY(void, glProgramUniform4iEXT, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -GL_ENTRY(void, glProgramUniform4ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value) -GL_ENTRY(void, glProgramUniformMatrix2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glUseProgramStagesEXT, GLuint pipeline, GLbitfield stages, GLuint program) -GL_ENTRY(void, glValidateProgramPipelineEXT, GLuint pipeline) -GL_ENTRY(void, glProgramUniform1uiEXT, GLuint program, GLint location, GLuint v0) -GL_ENTRY(void, glProgramUniform2uiEXT, GLuint program, GLint location, GLuint v0, GLuint v1) -GL_ENTRY(void, glProgramUniform3uiEXT, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) -GL_ENTRY(void, glProgramUniform4uiEXT, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) -GL_ENTRY(void, glProgramUniform1uivEXT, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniform2uivEXT, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniform3uivEXT, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniform4uivEXT, GLuint program, GLint location, GLsizei count, const GLuint *value) -GL_ENTRY(void, glProgramUniformMatrix2x3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix3x2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix2x4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix4x2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix3x4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glProgramUniformMatrix4x3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -GL_ENTRY(void, glTexPageCommitmentEXT, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) -GL_ENTRY(void, glPatchParameteriEXT, GLenum pname, GLint value) -GL_ENTRY(void, glTexParameterIivEXT, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexParameterIuivEXT, GLenum target, GLenum pname, const GLuint *params) -GL_ENTRY(void, glGetTexParameterIivEXT, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexParameterIuivEXT, GLenum target, GLenum pname, GLuint *params) -GL_ENTRY(void, glSamplerParameterIivEXT, GLuint sampler, GLenum pname, const GLint *param) -GL_ENTRY(void, glSamplerParameterIuivEXT, GLuint sampler, GLenum pname, const GLuint *param) -GL_ENTRY(void, glGetSamplerParameterIivEXT, GLuint sampler, GLenum pname, GLint *params) -GL_ENTRY(void, glGetSamplerParameterIuivEXT, GLuint sampler, GLenum pname, GLuint *params) -GL_ENTRY(void, glTexBufferEXT, GLenum target, GLenum internalformat, GLuint buffer) -GL_ENTRY(void, glTexBufferRangeEXT, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) -GL_ENTRY(void, glTexStorage1DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) -GL_ENTRY(void, glTexStorage2DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glTexStorage3DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) -GL_ENTRY(void, glTextureStorage1DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) -GL_ENTRY(void, glTextureStorage2DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glTextureStorage3DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) -GL_ENTRY(void, glTextureViewEXT, GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) diff --git a/libs/hwui/debug/gles_redefine.h b/libs/hwui/debug/gles_redefine.h deleted file mode 100644 index 49b506918372..000000000000 --- a/libs/hwui/debug/gles_redefine.h +++ /dev/null @@ -1,914 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define glActiveShaderProgram wrap_glActiveShaderProgram -#define glActiveShaderProgramEXT wrap_glActiveShaderProgramEXT -#define glActiveTexture wrap_glActiveTexture -#define glAlphaFunc wrap_glAlphaFunc -#define glAlphaFuncQCOM wrap_glAlphaFuncQCOM -#define glAlphaFuncx wrap_glAlphaFuncx -#define glAlphaFuncxOES wrap_glAlphaFuncxOES -#define glApplyFramebufferAttachmentCMAAINTEL wrap_glApplyFramebufferAttachmentCMAAINTEL -#define glAttachShader wrap_glAttachShader -#define glBeginConditionalRenderNV wrap_glBeginConditionalRenderNV -#define glBeginPerfMonitorAMD wrap_glBeginPerfMonitorAMD -#define glBeginPerfQueryINTEL wrap_glBeginPerfQueryINTEL -#define glBeginQuery wrap_glBeginQuery -#define glBeginQueryEXT wrap_glBeginQueryEXT -#define glBeginTransformFeedback wrap_glBeginTransformFeedback -#define glBindAttribLocation wrap_glBindAttribLocation -#define glBindBuffer wrap_glBindBuffer -#define glBindBufferBase wrap_glBindBufferBase -#define glBindBufferRange wrap_glBindBufferRange -#define glBindFragDataLocationEXT wrap_glBindFragDataLocationEXT -#define glBindFragDataLocationIndexedEXT wrap_glBindFragDataLocationIndexedEXT -#define glBindFramebuffer wrap_glBindFramebuffer -#define glBindFramebufferOES wrap_glBindFramebufferOES -#define glBindImageTexture wrap_glBindImageTexture -#define glBindProgramPipeline wrap_glBindProgramPipeline -#define glBindProgramPipelineEXT wrap_glBindProgramPipelineEXT -#define glBindRenderbuffer wrap_glBindRenderbuffer -#define glBindRenderbufferOES wrap_glBindRenderbufferOES -#define glBindSampler wrap_glBindSampler -#define glBindTexture wrap_glBindTexture -#define glBindTransformFeedback wrap_glBindTransformFeedback -#define glBindVertexArray wrap_glBindVertexArray -#define glBindVertexArrayOES wrap_glBindVertexArrayOES -#define glBindVertexBuffer wrap_glBindVertexBuffer -#define glBlendBarrier wrap_glBlendBarrier -#define glBlendBarrierKHR wrap_glBlendBarrierKHR -#define glBlendBarrierNV wrap_glBlendBarrierNV -#define glBlendColor wrap_glBlendColor -#define glBlendEquation wrap_glBlendEquation -#define glBlendEquationOES wrap_glBlendEquationOES -#define glBlendEquationSeparate wrap_glBlendEquationSeparate -#define glBlendEquationSeparateOES wrap_glBlendEquationSeparateOES -#define glBlendEquationSeparatei wrap_glBlendEquationSeparatei -#define glBlendEquationSeparateiEXT wrap_glBlendEquationSeparateiEXT -#define glBlendEquationSeparateiOES wrap_glBlendEquationSeparateiOES -#define glBlendEquationi wrap_glBlendEquationi -#define glBlendEquationiEXT wrap_glBlendEquationiEXT -#define glBlendEquationiOES wrap_glBlendEquationiOES -#define glBlendFunc wrap_glBlendFunc -#define glBlendFuncSeparate wrap_glBlendFuncSeparate -#define glBlendFuncSeparateOES wrap_glBlendFuncSeparateOES -#define glBlendFuncSeparatei wrap_glBlendFuncSeparatei -#define glBlendFuncSeparateiEXT wrap_glBlendFuncSeparateiEXT -#define glBlendFuncSeparateiOES wrap_glBlendFuncSeparateiOES -#define glBlendFunci wrap_glBlendFunci -#define glBlendFunciEXT wrap_glBlendFunciEXT -#define glBlendFunciOES wrap_glBlendFunciOES -#define glBlendParameteriNV wrap_glBlendParameteriNV -#define glBlitFramebuffer wrap_glBlitFramebuffer -#define glBlitFramebufferANGLE wrap_glBlitFramebufferANGLE -#define glBlitFramebufferNV wrap_glBlitFramebufferNV -#define glBufferData wrap_glBufferData -#define glBufferStorageEXT wrap_glBufferStorageEXT -#define glBufferSubData wrap_glBufferSubData -#define glCheckFramebufferStatus wrap_glCheckFramebufferStatus -#define glCheckFramebufferStatusOES wrap_glCheckFramebufferStatusOES -#define glClear wrap_glClear -#define glClearBufferfi wrap_glClearBufferfi -#define glClearBufferfv wrap_glClearBufferfv -#define glClearBufferiv wrap_glClearBufferiv -#define glClearBufferuiv wrap_glClearBufferuiv -#define glClearColor wrap_glClearColor -#define glClearColorx wrap_glClearColorx -#define glClearColorxOES wrap_glClearColorxOES -#define glClearDepthf wrap_glClearDepthf -#define glClearDepthfOES wrap_glClearDepthfOES -#define glClearDepthx wrap_glClearDepthx -#define glClearDepthxOES wrap_glClearDepthxOES -#define glClearStencil wrap_glClearStencil -#define glClientActiveTexture wrap_glClientActiveTexture -#define glClientWaitSync wrap_glClientWaitSync -#define glClientWaitSyncAPPLE wrap_glClientWaitSyncAPPLE -#define glClipPlanef wrap_glClipPlanef -#define glClipPlanefIMG wrap_glClipPlanefIMG -#define glClipPlanefOES wrap_glClipPlanefOES -#define glClipPlanex wrap_glClipPlanex -#define glClipPlanexIMG wrap_glClipPlanexIMG -#define glClipPlanexOES wrap_glClipPlanexOES -#define glColor4f wrap_glColor4f -#define glColor4ub wrap_glColor4ub -#define glColor4x wrap_glColor4x -#define glColor4xOES wrap_glColor4xOES -#define glColorMask wrap_glColorMask -#define glColorMaski wrap_glColorMaski -#define glColorMaskiEXT wrap_glColorMaskiEXT -#define glColorMaskiOES wrap_glColorMaskiOES -#define glColorPointer wrap_glColorPointer -#define glCompileShader wrap_glCompileShader -#define glCompressedTexImage2D wrap_glCompressedTexImage2D -#define glCompressedTexImage3D wrap_glCompressedTexImage3D -#define glCompressedTexImage3DOES wrap_glCompressedTexImage3DOES -#define glCompressedTexSubImage2D wrap_glCompressedTexSubImage2D -#define glCompressedTexSubImage3D wrap_glCompressedTexSubImage3D -#define glCompressedTexSubImage3DOES wrap_glCompressedTexSubImage3DOES -#define glCopyBufferSubData wrap_glCopyBufferSubData -#define glCopyBufferSubDataNV wrap_glCopyBufferSubDataNV -#define glCopyImageSubData wrap_glCopyImageSubData -#define glCopyImageSubDataEXT wrap_glCopyImageSubDataEXT -#define glCopyImageSubDataOES wrap_glCopyImageSubDataOES -#define glCopyPathNV wrap_glCopyPathNV -#define glCopyTexImage2D wrap_glCopyTexImage2D -#define glCopyTexSubImage2D wrap_glCopyTexSubImage2D -#define glCopyTexSubImage3D wrap_glCopyTexSubImage3D -#define glCopyTexSubImage3DOES wrap_glCopyTexSubImage3DOES -#define glCopyTextureLevelsAPPLE wrap_glCopyTextureLevelsAPPLE -#define glCoverFillPathInstancedNV wrap_glCoverFillPathInstancedNV -#define glCoverFillPathNV wrap_glCoverFillPathNV -#define glCoverStrokePathInstancedNV wrap_glCoverStrokePathInstancedNV -#define glCoverStrokePathNV wrap_glCoverStrokePathNV -#define glCoverageMaskNV wrap_glCoverageMaskNV -#define glCoverageModulationNV wrap_glCoverageModulationNV -#define glCoverageModulationTableNV wrap_glCoverageModulationTableNV -#define glCoverageOperationNV wrap_glCoverageOperationNV -#define glCreatePerfQueryINTEL wrap_glCreatePerfQueryINTEL -#define glCreateProgram wrap_glCreateProgram -#define glCreateShader wrap_glCreateShader -#define glCreateShaderProgramv wrap_glCreateShaderProgramv -#define glCreateShaderProgramvEXT wrap_glCreateShaderProgramvEXT -#define glCullFace wrap_glCullFace -#define glCurrentPaletteMatrixOES wrap_glCurrentPaletteMatrixOES -#define glDebugMessageCallback wrap_glDebugMessageCallback -#define glDebugMessageCallbackKHR wrap_glDebugMessageCallbackKHR -#define glDebugMessageControl wrap_glDebugMessageControl -#define glDebugMessageControlKHR wrap_glDebugMessageControlKHR -#define glDebugMessageInsert wrap_glDebugMessageInsert -#define glDebugMessageInsertKHR wrap_glDebugMessageInsertKHR -#define glDeleteBuffers wrap_glDeleteBuffers -#define glDeleteFencesNV wrap_glDeleteFencesNV -#define glDeleteFramebuffers wrap_glDeleteFramebuffers -#define glDeleteFramebuffersOES wrap_glDeleteFramebuffersOES -#define glDeletePathsNV wrap_glDeletePathsNV -#define glDeletePerfMonitorsAMD wrap_glDeletePerfMonitorsAMD -#define glDeletePerfQueryINTEL wrap_glDeletePerfQueryINTEL -#define glDeleteProgram wrap_glDeleteProgram -#define glDeleteProgramPipelines wrap_glDeleteProgramPipelines -#define glDeleteProgramPipelinesEXT wrap_glDeleteProgramPipelinesEXT -#define glDeleteQueries wrap_glDeleteQueries -#define glDeleteQueriesEXT wrap_glDeleteQueriesEXT -#define glDeleteRenderbuffers wrap_glDeleteRenderbuffers -#define glDeleteRenderbuffersOES wrap_glDeleteRenderbuffersOES -#define glDeleteSamplers wrap_glDeleteSamplers -#define glDeleteShader wrap_glDeleteShader -#define glDeleteSync wrap_glDeleteSync -#define glDeleteSyncAPPLE wrap_glDeleteSyncAPPLE -#define glDeleteTextures wrap_glDeleteTextures -#define glDeleteTransformFeedbacks wrap_glDeleteTransformFeedbacks -#define glDeleteVertexArrays wrap_glDeleteVertexArrays -#define glDeleteVertexArraysOES wrap_glDeleteVertexArraysOES -#define glDepthFunc wrap_glDepthFunc -#define glDepthMask wrap_glDepthMask -#define glDepthRangeArrayfvNV wrap_glDepthRangeArrayfvNV -#define glDepthRangeIndexedfNV wrap_glDepthRangeIndexedfNV -#define glDepthRangef wrap_glDepthRangef -#define glDepthRangefOES wrap_glDepthRangefOES -#define glDepthRangex wrap_glDepthRangex -#define glDepthRangexOES wrap_glDepthRangexOES -#define glDetachShader wrap_glDetachShader -#define glDisable wrap_glDisable -#define glDisableClientState wrap_glDisableClientState -#define glDisableDriverControlQCOM wrap_glDisableDriverControlQCOM -#define glDisableVertexAttribArray wrap_glDisableVertexAttribArray -#define glDisablei wrap_glDisablei -#define glDisableiEXT wrap_glDisableiEXT -#define glDisableiNV wrap_glDisableiNV -#define glDisableiOES wrap_glDisableiOES -#define glDiscardFramebufferEXT wrap_glDiscardFramebufferEXT -#define glDispatchCompute wrap_glDispatchCompute -#define glDispatchComputeIndirect wrap_glDispatchComputeIndirect -#define glDrawArrays wrap_glDrawArrays -#define glDrawArraysIndirect wrap_glDrawArraysIndirect -#define glDrawArraysInstanced wrap_glDrawArraysInstanced -#define glDrawArraysInstancedANGLE wrap_glDrawArraysInstancedANGLE -#define glDrawArraysInstancedBaseInstanceEXT wrap_glDrawArraysInstancedBaseInstanceEXT -#define glDrawArraysInstancedEXT wrap_glDrawArraysInstancedEXT -#define glDrawArraysInstancedNV wrap_glDrawArraysInstancedNV -#define glDrawBuffers wrap_glDrawBuffers -#define glDrawBuffersEXT wrap_glDrawBuffersEXT -#define glDrawBuffersIndexedEXT wrap_glDrawBuffersIndexedEXT -#define glDrawBuffersNV wrap_glDrawBuffersNV -#define glDrawElements wrap_glDrawElements -#define glDrawElementsBaseVertex wrap_glDrawElementsBaseVertex -#define glDrawElementsBaseVertexEXT wrap_glDrawElementsBaseVertexEXT -#define glDrawElementsBaseVertexOES wrap_glDrawElementsBaseVertexOES -#define glDrawElementsIndirect wrap_glDrawElementsIndirect -#define glDrawElementsInstanced wrap_glDrawElementsInstanced -#define glDrawElementsInstancedANGLE wrap_glDrawElementsInstancedANGLE -#define glDrawElementsInstancedBaseInstanceEXT wrap_glDrawElementsInstancedBaseInstanceEXT -#define glDrawElementsInstancedBaseVertex wrap_glDrawElementsInstancedBaseVertex -#define glDrawElementsInstancedBaseVertexBaseInstanceEXT \ - wrap_glDrawElementsInstancedBaseVertexBaseInstanceEXT -#define glDrawElementsInstancedBaseVertexEXT wrap_glDrawElementsInstancedBaseVertexEXT -#define glDrawElementsInstancedBaseVertexOES wrap_glDrawElementsInstancedBaseVertexOES -#define glDrawElementsInstancedEXT wrap_glDrawElementsInstancedEXT -#define glDrawElementsInstancedNV wrap_glDrawElementsInstancedNV -#define glDrawRangeElements wrap_glDrawRangeElements -#define glDrawRangeElementsBaseVertex wrap_glDrawRangeElementsBaseVertex -#define glDrawRangeElementsBaseVertexEXT wrap_glDrawRangeElementsBaseVertexEXT -#define glDrawRangeElementsBaseVertexOES wrap_glDrawRangeElementsBaseVertexOES -#define glDrawTexfOES wrap_glDrawTexfOES -#define glDrawTexfvOES wrap_glDrawTexfvOES -#define glDrawTexiOES wrap_glDrawTexiOES -#define glDrawTexivOES wrap_glDrawTexivOES -#define glDrawTexsOES wrap_glDrawTexsOES -#define glDrawTexsvOES wrap_glDrawTexsvOES -#define glDrawTexxOES wrap_glDrawTexxOES -#define glDrawTexxvOES wrap_glDrawTexxvOES -#define glEGLImageTargetRenderbufferStorageOES wrap_glEGLImageTargetRenderbufferStorageOES -#define glEGLImageTargetTexture2DOES wrap_glEGLImageTargetTexture2DOES -#define glEnable wrap_glEnable -#define glEnableClientState wrap_glEnableClientState -#define glEnableDriverControlQCOM wrap_glEnableDriverControlQCOM -#define glEnableVertexAttribArray wrap_glEnableVertexAttribArray -#define glEnablei wrap_glEnablei -#define glEnableiEXT wrap_glEnableiEXT -#define glEnableiNV wrap_glEnableiNV -#define glEnableiOES wrap_glEnableiOES -#define glEndConditionalRenderNV wrap_glEndConditionalRenderNV -#define glEndPerfMonitorAMD wrap_glEndPerfMonitorAMD -#define glEndPerfQueryINTEL wrap_glEndPerfQueryINTEL -#define glEndQuery wrap_glEndQuery -#define glEndQueryEXT wrap_glEndQueryEXT -#define glEndTilingQCOM wrap_glEndTilingQCOM -#define glEndTransformFeedback wrap_glEndTransformFeedback -#define glExtGetBufferPointervQCOM wrap_glExtGetBufferPointervQCOM -#define glExtGetBuffersQCOM wrap_glExtGetBuffersQCOM -#define glExtGetFramebuffersQCOM wrap_glExtGetFramebuffersQCOM -#define glExtGetProgramBinarySourceQCOM wrap_glExtGetProgramBinarySourceQCOM -#define glExtGetProgramsQCOM wrap_glExtGetProgramsQCOM -#define glExtGetRenderbuffersQCOM wrap_glExtGetRenderbuffersQCOM -#define glExtGetShadersQCOM wrap_glExtGetShadersQCOM -#define glExtGetTexLevelParameterivQCOM wrap_glExtGetTexLevelParameterivQCOM -#define glExtGetTexSubImageQCOM wrap_glExtGetTexSubImageQCOM -#define glExtGetTexturesQCOM wrap_glExtGetTexturesQCOM -#define glExtIsProgramBinaryQCOM wrap_glExtIsProgramBinaryQCOM -#define glExtTexObjectStateOverrideiQCOM wrap_glExtTexObjectStateOverrideiQCOM -#define glFenceSync wrap_glFenceSync -#define glFenceSyncAPPLE wrap_glFenceSyncAPPLE -#define glFinish wrap_glFinish -#define glFinishFenceNV wrap_glFinishFenceNV -#define glFlush wrap_glFlush -#define glFlushMappedBufferRange wrap_glFlushMappedBufferRange -#define glFlushMappedBufferRangeEXT wrap_glFlushMappedBufferRangeEXT -#define glFogf wrap_glFogf -#define glFogfv wrap_glFogfv -#define glFogx wrap_glFogx -#define glFogxOES wrap_glFogxOES -#define glFogxv wrap_glFogxv -#define glFogxvOES wrap_glFogxvOES -#define glFragmentCoverageColorNV wrap_glFragmentCoverageColorNV -#define glFramebufferParameteri wrap_glFramebufferParameteri -#define glFramebufferRenderbuffer wrap_glFramebufferRenderbuffer -#define glFramebufferRenderbufferOES wrap_glFramebufferRenderbufferOES -#define glFramebufferSampleLocationsfvNV wrap_glFramebufferSampleLocationsfvNV -#define glFramebufferTexture wrap_glFramebufferTexture -#define glFramebufferTexture2D wrap_glFramebufferTexture2D -#define glFramebufferTexture2DMultisampleEXT wrap_glFramebufferTexture2DMultisampleEXT -#define glFramebufferTexture2DMultisampleIMG wrap_glFramebufferTexture2DMultisampleIMG -#define glFramebufferTexture2DOES wrap_glFramebufferTexture2DOES -#define glFramebufferTexture3DOES wrap_glFramebufferTexture3DOES -#define glFramebufferTextureEXT wrap_glFramebufferTextureEXT -#define glFramebufferTextureLayer wrap_glFramebufferTextureLayer -#define glFramebufferTextureMultisampleMultiviewOVR wrap_glFramebufferTextureMultisampleMultiviewOVR -#define glFramebufferTextureMultiviewOVR wrap_glFramebufferTextureMultiviewOVR -#define glFramebufferTextureOES wrap_glFramebufferTextureOES -#define glFrontFace wrap_glFrontFace -#define glFrustumf wrap_glFrustumf -#define glFrustumfOES wrap_glFrustumfOES -#define glFrustumx wrap_glFrustumx -#define glFrustumxOES wrap_glFrustumxOES -#define glGenBuffers wrap_glGenBuffers -#define glGenFencesNV wrap_glGenFencesNV -#define glGenFramebuffers wrap_glGenFramebuffers -#define glGenFramebuffersOES wrap_glGenFramebuffersOES -#define glGenPathsNV wrap_glGenPathsNV -#define glGenPerfMonitorsAMD wrap_glGenPerfMonitorsAMD -#define glGenProgramPipelines wrap_glGenProgramPipelines -#define glGenProgramPipelinesEXT wrap_glGenProgramPipelinesEXT -#define glGenQueries wrap_glGenQueries -#define glGenQueriesEXT wrap_glGenQueriesEXT -#define glGenRenderbuffers wrap_glGenRenderbuffers -#define glGenRenderbuffersOES wrap_glGenRenderbuffersOES -#define glGenSamplers wrap_glGenSamplers -#define glGenTextures wrap_glGenTextures -#define glGenTransformFeedbacks wrap_glGenTransformFeedbacks -#define glGenVertexArrays wrap_glGenVertexArrays -#define glGenVertexArraysOES wrap_glGenVertexArraysOES -#define glGenerateMipmap wrap_glGenerateMipmap -#define glGenerateMipmapOES wrap_glGenerateMipmapOES -#define glGetActiveAttrib wrap_glGetActiveAttrib -#define glGetActiveUniform wrap_glGetActiveUniform -#define glGetActiveUniformBlockName wrap_glGetActiveUniformBlockName -#define glGetActiveUniformBlockiv wrap_glGetActiveUniformBlockiv -#define glGetActiveUniformsiv wrap_glGetActiveUniformsiv -#define glGetAttachedShaders wrap_glGetAttachedShaders -#define glGetAttribLocation wrap_glGetAttribLocation -#define glGetBooleani_v wrap_glGetBooleani_v -#define glGetBooleanv wrap_glGetBooleanv -#define glGetBufferParameteri64v wrap_glGetBufferParameteri64v -#define glGetBufferParameteriv wrap_glGetBufferParameteriv -#define glGetBufferPointerv wrap_glGetBufferPointerv -#define glGetBufferPointervOES wrap_glGetBufferPointervOES -#define glGetClipPlanef wrap_glGetClipPlanef -#define glGetClipPlanefOES wrap_glGetClipPlanefOES -#define glGetClipPlanex wrap_glGetClipPlanex -#define glGetClipPlanexOES wrap_glGetClipPlanexOES -#define glGetCoverageModulationTableNV wrap_glGetCoverageModulationTableNV -#define glGetDebugMessageLog wrap_glGetDebugMessageLog -#define glGetDebugMessageLogKHR wrap_glGetDebugMessageLogKHR -#define glGetDriverControlStringQCOM wrap_glGetDriverControlStringQCOM -#define glGetDriverControlsQCOM wrap_glGetDriverControlsQCOM -#define glGetError wrap_glGetError -#define glGetFenceivNV wrap_glGetFenceivNV -#define glGetFirstPerfQueryIdINTEL wrap_glGetFirstPerfQueryIdINTEL -#define glGetFixedv wrap_glGetFixedv -#define glGetFixedvOES wrap_glGetFixedvOES -#define glGetFloati_vNV wrap_glGetFloati_vNV -#define glGetFloatv wrap_glGetFloatv -#define glGetFragDataIndexEXT wrap_glGetFragDataIndexEXT -#define glGetFragDataLocation wrap_glGetFragDataLocation -#define glGetFramebufferAttachmentParameteriv wrap_glGetFramebufferAttachmentParameteriv -#define glGetFramebufferAttachmentParameterivOES wrap_glGetFramebufferAttachmentParameterivOES -#define glGetFramebufferParameteriv wrap_glGetFramebufferParameteriv -#define glGetGraphicsResetStatus wrap_glGetGraphicsResetStatus -#define glGetGraphicsResetStatusEXT wrap_glGetGraphicsResetStatusEXT -#define glGetGraphicsResetStatusKHR wrap_glGetGraphicsResetStatusKHR -#define glGetImageHandleNV wrap_glGetImageHandleNV -#define glGetInteger64i_v wrap_glGetInteger64i_v -#define glGetInteger64v wrap_glGetInteger64v -#define glGetInteger64vAPPLE wrap_glGetInteger64vAPPLE -#define glGetIntegeri_v wrap_glGetIntegeri_v -#define glGetIntegeri_vEXT wrap_glGetIntegeri_vEXT -#define glGetIntegerv wrap_glGetIntegerv -#define glGetInternalformatSampleivNV wrap_glGetInternalformatSampleivNV -#define glGetInternalformativ wrap_glGetInternalformativ -#define glGetLightfv wrap_glGetLightfv -#define glGetLightxv wrap_glGetLightxv -#define glGetLightxvOES wrap_glGetLightxvOES -#define glGetMaterialfv wrap_glGetMaterialfv -#define glGetMaterialxv wrap_glGetMaterialxv -#define glGetMaterialxvOES wrap_glGetMaterialxvOES -#define glGetMultisamplefv wrap_glGetMultisamplefv -#define glGetNextPerfQueryIdINTEL wrap_glGetNextPerfQueryIdINTEL -#define glGetObjectLabel wrap_glGetObjectLabel -#define glGetObjectLabelEXT wrap_glGetObjectLabelEXT -#define glGetObjectLabelKHR wrap_glGetObjectLabelKHR -#define glGetObjectPtrLabel wrap_glGetObjectPtrLabel -#define glGetObjectPtrLabelKHR wrap_glGetObjectPtrLabelKHR -#define glGetPathCommandsNV wrap_glGetPathCommandsNV -#define glGetPathCoordsNV wrap_glGetPathCoordsNV -#define glGetPathDashArrayNV wrap_glGetPathDashArrayNV -#define glGetPathLengthNV wrap_glGetPathLengthNV -#define glGetPathMetricRangeNV wrap_glGetPathMetricRangeNV -#define glGetPathMetricsNV wrap_glGetPathMetricsNV -#define glGetPathParameterfvNV wrap_glGetPathParameterfvNV -#define glGetPathParameterivNV wrap_glGetPathParameterivNV -#define glGetPathSpacingNV wrap_glGetPathSpacingNV -#define glGetPerfCounterInfoINTEL wrap_glGetPerfCounterInfoINTEL -#define glGetPerfMonitorCounterDataAMD wrap_glGetPerfMonitorCounterDataAMD -#define glGetPerfMonitorCounterInfoAMD wrap_glGetPerfMonitorCounterInfoAMD -#define glGetPerfMonitorCounterStringAMD wrap_glGetPerfMonitorCounterStringAMD -#define glGetPerfMonitorCountersAMD wrap_glGetPerfMonitorCountersAMD -#define glGetPerfMonitorGroupStringAMD wrap_glGetPerfMonitorGroupStringAMD -#define glGetPerfMonitorGroupsAMD wrap_glGetPerfMonitorGroupsAMD -#define glGetPerfQueryDataINTEL wrap_glGetPerfQueryDataINTEL -#define glGetPerfQueryIdByNameINTEL wrap_glGetPerfQueryIdByNameINTEL -#define glGetPerfQueryInfoINTEL wrap_glGetPerfQueryInfoINTEL -#define glGetPointerv wrap_glGetPointerv -#define glGetPointervKHR wrap_glGetPointervKHR -#define glGetProgramBinary wrap_glGetProgramBinary -#define glGetProgramBinaryOES wrap_glGetProgramBinaryOES -#define glGetProgramInfoLog wrap_glGetProgramInfoLog -#define glGetProgramInterfaceiv wrap_glGetProgramInterfaceiv -#define glGetProgramPipelineInfoLog wrap_glGetProgramPipelineInfoLog -#define glGetProgramPipelineInfoLogEXT wrap_glGetProgramPipelineInfoLogEXT -#define glGetProgramPipelineiv wrap_glGetProgramPipelineiv -#define glGetProgramPipelineivEXT wrap_glGetProgramPipelineivEXT -#define glGetProgramResourceIndex wrap_glGetProgramResourceIndex -#define glGetProgramResourceLocation wrap_glGetProgramResourceLocation -#define glGetProgramResourceLocationIndexEXT wrap_glGetProgramResourceLocationIndexEXT -#define glGetProgramResourceName wrap_glGetProgramResourceName -#define glGetProgramResourcefvNV wrap_glGetProgramResourcefvNV -#define glGetProgramResourceiv wrap_glGetProgramResourceiv -#define glGetProgramiv wrap_glGetProgramiv -#define glGetQueryObjecti64vEXT wrap_glGetQueryObjecti64vEXT -#define glGetQueryObjectivEXT wrap_glGetQueryObjectivEXT -#define glGetQueryObjectui64vEXT wrap_glGetQueryObjectui64vEXT -#define glGetQueryObjectuiv wrap_glGetQueryObjectuiv -#define glGetQueryObjectuivEXT wrap_glGetQueryObjectuivEXT -#define glGetQueryiv wrap_glGetQueryiv -#define glGetQueryivEXT wrap_glGetQueryivEXT -#define glGetRenderbufferParameteriv wrap_glGetRenderbufferParameteriv -#define glGetRenderbufferParameterivOES wrap_glGetRenderbufferParameterivOES -#define glGetSamplerParameterIiv wrap_glGetSamplerParameterIiv -#define glGetSamplerParameterIivEXT wrap_glGetSamplerParameterIivEXT -#define glGetSamplerParameterIivOES wrap_glGetSamplerParameterIivOES -#define glGetSamplerParameterIuiv wrap_glGetSamplerParameterIuiv -#define glGetSamplerParameterIuivEXT wrap_glGetSamplerParameterIuivEXT -#define glGetSamplerParameterIuivOES wrap_glGetSamplerParameterIuivOES -#define glGetSamplerParameterfv wrap_glGetSamplerParameterfv -#define glGetSamplerParameteriv wrap_glGetSamplerParameteriv -#define glGetShaderInfoLog wrap_glGetShaderInfoLog -#define glGetShaderPrecisionFormat wrap_glGetShaderPrecisionFormat -#define glGetShaderSource wrap_glGetShaderSource -#define glGetShaderiv wrap_glGetShaderiv -#define glGetString wrap_glGetString -#define glGetStringi wrap_glGetStringi -#define glGetSynciv wrap_glGetSynciv -#define glGetSyncivAPPLE wrap_glGetSyncivAPPLE -#define glGetTexEnvfv wrap_glGetTexEnvfv -#define glGetTexEnviv wrap_glGetTexEnviv -#define glGetTexEnvxv wrap_glGetTexEnvxv -#define glGetTexEnvxvOES wrap_glGetTexEnvxvOES -#define glGetTexGenfvOES wrap_glGetTexGenfvOES -#define glGetTexGenivOES wrap_glGetTexGenivOES -#define glGetTexGenxvOES wrap_glGetTexGenxvOES -#define glGetTexLevelParameterfv wrap_glGetTexLevelParameterfv -#define glGetTexLevelParameteriv wrap_glGetTexLevelParameteriv -#define glGetTexParameterIiv wrap_glGetTexParameterIiv -#define glGetTexParameterIivEXT wrap_glGetTexParameterIivEXT -#define glGetTexParameterIivOES wrap_glGetTexParameterIivOES -#define glGetTexParameterIuiv wrap_glGetTexParameterIuiv -#define glGetTexParameterIuivEXT wrap_glGetTexParameterIuivEXT -#define glGetTexParameterIuivOES wrap_glGetTexParameterIuivOES -#define glGetTexParameterfv wrap_glGetTexParameterfv -#define glGetTexParameteriv wrap_glGetTexParameteriv -#define glGetTexParameterxv wrap_glGetTexParameterxv -#define glGetTexParameterxvOES wrap_glGetTexParameterxvOES -#define glGetTextureHandleNV wrap_glGetTextureHandleNV -#define glGetTextureSamplerHandleNV wrap_glGetTextureSamplerHandleNV -#define glGetTransformFeedbackVarying wrap_glGetTransformFeedbackVarying -#define glGetTranslatedShaderSourceANGLE wrap_glGetTranslatedShaderSourceANGLE -#define glGetUniformBlockIndex wrap_glGetUniformBlockIndex -#define glGetUniformIndices wrap_glGetUniformIndices -#define glGetUniformLocation wrap_glGetUniformLocation -#define glGetUniformfv wrap_glGetUniformfv -#define glGetUniformiv wrap_glGetUniformiv -#define glGetUniformuiv wrap_glGetUniformuiv -#define glGetVertexAttribIiv wrap_glGetVertexAttribIiv -#define glGetVertexAttribIuiv wrap_glGetVertexAttribIuiv -#define glGetVertexAttribPointerv wrap_glGetVertexAttribPointerv -#define glGetVertexAttribfv wrap_glGetVertexAttribfv -#define glGetVertexAttribiv wrap_glGetVertexAttribiv -#define glGetnUniformfv wrap_glGetnUniformfv -#define glGetnUniformfvEXT wrap_glGetnUniformfvEXT -#define glGetnUniformfvKHR wrap_glGetnUniformfvKHR -#define glGetnUniformiv wrap_glGetnUniformiv -#define glGetnUniformivEXT wrap_glGetnUniformivEXT -#define glGetnUniformivKHR wrap_glGetnUniformivKHR -#define glGetnUniformuiv wrap_glGetnUniformuiv -#define glGetnUniformuivKHR wrap_glGetnUniformuivKHR -#define glHint wrap_glHint -#define glInsertEventMarkerEXT wrap_glInsertEventMarkerEXT -#define glInterpolatePathsNV wrap_glInterpolatePathsNV -#define glInvalidateFramebuffer wrap_glInvalidateFramebuffer -#define glInvalidateSubFramebuffer wrap_glInvalidateSubFramebuffer -#define glIsBuffer wrap_glIsBuffer -#define glIsEnabled wrap_glIsEnabled -#define glIsEnabledi wrap_glIsEnabledi -#define glIsEnablediEXT wrap_glIsEnablediEXT -#define glIsEnablediNV wrap_glIsEnablediNV -#define glIsEnablediOES wrap_glIsEnablediOES -#define glIsFenceNV wrap_glIsFenceNV -#define glIsFramebuffer wrap_glIsFramebuffer -#define glIsFramebufferOES wrap_glIsFramebufferOES -#define glIsImageHandleResidentNV wrap_glIsImageHandleResidentNV -#define glIsPathNV wrap_glIsPathNV -#define glIsPointInFillPathNV wrap_glIsPointInFillPathNV -#define glIsPointInStrokePathNV wrap_glIsPointInStrokePathNV -#define glIsProgram wrap_glIsProgram -#define glIsProgramPipeline wrap_glIsProgramPipeline -#define glIsProgramPipelineEXT wrap_glIsProgramPipelineEXT -#define glIsQuery wrap_glIsQuery -#define glIsQueryEXT wrap_glIsQueryEXT -#define glIsRenderbuffer wrap_glIsRenderbuffer -#define glIsRenderbufferOES wrap_glIsRenderbufferOES -#define glIsSampler wrap_glIsSampler -#define glIsShader wrap_glIsShader -#define glIsSync wrap_glIsSync -#define glIsSyncAPPLE wrap_glIsSyncAPPLE -#define glIsTexture wrap_glIsTexture -#define glIsTextureHandleResidentNV wrap_glIsTextureHandleResidentNV -#define glIsTransformFeedback wrap_glIsTransformFeedback -#define glIsVertexArray wrap_glIsVertexArray -#define glIsVertexArrayOES wrap_glIsVertexArrayOES -#define glLabelObjectEXT wrap_glLabelObjectEXT -#define glLightModelf wrap_glLightModelf -#define glLightModelfv wrap_glLightModelfv -#define glLightModelx wrap_glLightModelx -#define glLightModelxOES wrap_glLightModelxOES -#define glLightModelxv wrap_glLightModelxv -#define glLightModelxvOES wrap_glLightModelxvOES -#define glLightf wrap_glLightf -#define glLightfv wrap_glLightfv -#define glLightx wrap_glLightx -#define glLightxOES wrap_glLightxOES -#define glLightxv wrap_glLightxv -#define glLightxvOES wrap_glLightxvOES -#define glLineWidth wrap_glLineWidth -#define glLineWidthx wrap_glLineWidthx -#define glLineWidthxOES wrap_glLineWidthxOES -#define glLinkProgram wrap_glLinkProgram -#define glLoadIdentity wrap_glLoadIdentity -#define glLoadMatrixf wrap_glLoadMatrixf -#define glLoadMatrixx wrap_glLoadMatrixx -#define glLoadMatrixxOES wrap_glLoadMatrixxOES -#define glLoadPaletteFromModelViewMatrixOES wrap_glLoadPaletteFromModelViewMatrixOES -#define glLogicOp wrap_glLogicOp -#define glMakeImageHandleNonResidentNV wrap_glMakeImageHandleNonResidentNV -#define glMakeImageHandleResidentNV wrap_glMakeImageHandleResidentNV -#define glMakeTextureHandleNonResidentNV wrap_glMakeTextureHandleNonResidentNV -#define glMakeTextureHandleResidentNV wrap_glMakeTextureHandleResidentNV -#define glMapBufferOES wrap_glMapBufferOES -#define glMapBufferRange wrap_glMapBufferRange -#define glMapBufferRangeEXT wrap_glMapBufferRangeEXT -#define glMaterialf wrap_glMaterialf -#define glMaterialfv wrap_glMaterialfv -#define glMaterialx wrap_glMaterialx -#define glMaterialxOES wrap_glMaterialxOES -#define glMaterialxv wrap_glMaterialxv -#define glMaterialxvOES wrap_glMaterialxvOES -#define glMatrixIndexPointerOES wrap_glMatrixIndexPointerOES -#define glMatrixLoad3x2fNV wrap_glMatrixLoad3x2fNV -#define glMatrixLoad3x3fNV wrap_glMatrixLoad3x3fNV -#define glMatrixLoadTranspose3x3fNV wrap_glMatrixLoadTranspose3x3fNV -#define glMatrixMode wrap_glMatrixMode -#define glMatrixMult3x2fNV wrap_glMatrixMult3x2fNV -#define glMatrixMult3x3fNV wrap_glMatrixMult3x3fNV -#define glMatrixMultTranspose3x3fNV wrap_glMatrixMultTranspose3x3fNV -#define glMemoryBarrier wrap_glMemoryBarrier -#define glMemoryBarrierByRegion wrap_glMemoryBarrierByRegion -#define glMinSampleShading wrap_glMinSampleShading -#define glMinSampleShadingOES wrap_glMinSampleShadingOES -#define glMultMatrixf wrap_glMultMatrixf -#define glMultMatrixx wrap_glMultMatrixx -#define glMultMatrixxOES wrap_glMultMatrixxOES -#define glMultiDrawArraysEXT wrap_glMultiDrawArraysEXT -#define glMultiDrawArraysIndirectEXT wrap_glMultiDrawArraysIndirectEXT -#define glMultiDrawElementsBaseVertexEXT wrap_glMultiDrawElementsBaseVertexEXT -#define glMultiDrawElementsBaseVertexOES wrap_glMultiDrawElementsBaseVertexOES -#define glMultiDrawElementsEXT wrap_glMultiDrawElementsEXT -#define glMultiDrawElementsIndirectEXT wrap_glMultiDrawElementsIndirectEXT -#define glMultiTexCoord4f wrap_glMultiTexCoord4f -#define glMultiTexCoord4x wrap_glMultiTexCoord4x -#define glMultiTexCoord4xOES wrap_glMultiTexCoord4xOES -#define glNamedFramebufferSampleLocationsfvNV wrap_glNamedFramebufferSampleLocationsfvNV -#define glNormal3f wrap_glNormal3f -#define glNormal3x wrap_glNormal3x -#define glNormal3xOES wrap_glNormal3xOES -#define glNormalPointer wrap_glNormalPointer -#define glObjectLabel wrap_glObjectLabel -#define glObjectLabelKHR wrap_glObjectLabelKHR -#define glObjectPtrLabel wrap_glObjectPtrLabel -#define glObjectPtrLabelKHR wrap_glObjectPtrLabelKHR -#define glOrthof wrap_glOrthof -#define glOrthofOES wrap_glOrthofOES -#define glOrthox wrap_glOrthox -#define glOrthoxOES wrap_glOrthoxOES -#define glPatchParameteri wrap_glPatchParameteri -#define glPatchParameteriEXT wrap_glPatchParameteriEXT -#define glPatchParameteriOES wrap_glPatchParameteriOES -#define glPathCommandsNV wrap_glPathCommandsNV -#define glPathCoordsNV wrap_glPathCoordsNV -#define glPathCoverDepthFuncNV wrap_glPathCoverDepthFuncNV -#define glPathDashArrayNV wrap_glPathDashArrayNV -#define glPathGlyphIndexArrayNV wrap_glPathGlyphIndexArrayNV -#define glPathGlyphIndexRangeNV wrap_glPathGlyphIndexRangeNV -#define glPathGlyphRangeNV wrap_glPathGlyphRangeNV -#define glPathGlyphsNV wrap_glPathGlyphsNV -#define glPathMemoryGlyphIndexArrayNV wrap_glPathMemoryGlyphIndexArrayNV -#define glPathParameterfNV wrap_glPathParameterfNV -#define glPathParameterfvNV wrap_glPathParameterfvNV -#define glPathParameteriNV wrap_glPathParameteriNV -#define glPathParameterivNV wrap_glPathParameterivNV -#define glPathStencilDepthOffsetNV wrap_glPathStencilDepthOffsetNV -#define glPathStencilFuncNV wrap_glPathStencilFuncNV -#define glPathStringNV wrap_glPathStringNV -#define glPathSubCommandsNV wrap_glPathSubCommandsNV -#define glPathSubCoordsNV wrap_glPathSubCoordsNV -#define glPauseTransformFeedback wrap_glPauseTransformFeedback -#define glPixelStorei wrap_glPixelStorei -#define glPointAlongPathNV wrap_glPointAlongPathNV -#define glPointParameterf wrap_glPointParameterf -#define glPointParameterfv wrap_glPointParameterfv -#define glPointParameterx wrap_glPointParameterx -#define glPointParameterxOES wrap_glPointParameterxOES -#define glPointParameterxv wrap_glPointParameterxv -#define glPointParameterxvOES wrap_glPointParameterxvOES -#define glPointSize wrap_glPointSize -#define glPointSizePointerOES wrap_glPointSizePointerOES -#define glPointSizex wrap_glPointSizex -#define glPointSizexOES wrap_glPointSizexOES -#define glPolygonModeNV wrap_glPolygonModeNV -#define glPolygonOffset wrap_glPolygonOffset -#define glPolygonOffsetx wrap_glPolygonOffsetx -#define glPolygonOffsetxOES wrap_glPolygonOffsetxOES -#define glPopDebugGroup wrap_glPopDebugGroup -#define glPopDebugGroupKHR wrap_glPopDebugGroupKHR -#define glPopGroupMarkerEXT wrap_glPopGroupMarkerEXT -#define glPopMatrix wrap_glPopMatrix -#define glPrimitiveBoundingBox wrap_glPrimitiveBoundingBox -#define glPrimitiveBoundingBoxEXT wrap_glPrimitiveBoundingBoxEXT -#define glPrimitiveBoundingBoxOES wrap_glPrimitiveBoundingBoxOES -#define glProgramBinary wrap_glProgramBinary -#define glProgramBinaryOES wrap_glProgramBinaryOES -#define glProgramParameteri wrap_glProgramParameteri -#define glProgramParameteriEXT wrap_glProgramParameteriEXT -#define glProgramPathFragmentInputGenNV wrap_glProgramPathFragmentInputGenNV -#define glProgramUniform1f wrap_glProgramUniform1f -#define glProgramUniform1fEXT wrap_glProgramUniform1fEXT -#define glProgramUniform1fv wrap_glProgramUniform1fv -#define glProgramUniform1fvEXT wrap_glProgramUniform1fvEXT -#define glProgramUniform1i wrap_glProgramUniform1i -#define glProgramUniform1iEXT wrap_glProgramUniform1iEXT -#define glProgramUniform1iv wrap_glProgramUniform1iv -#define glProgramUniform1ivEXT wrap_glProgramUniform1ivEXT -#define glProgramUniform1ui wrap_glProgramUniform1ui -#define glProgramUniform1uiEXT wrap_glProgramUniform1uiEXT -#define glProgramUniform1uiv wrap_glProgramUniform1uiv -#define glProgramUniform1uivEXT wrap_glProgramUniform1uivEXT -#define glProgramUniform2f wrap_glProgramUniform2f -#define glProgramUniform2fEXT wrap_glProgramUniform2fEXT -#define glProgramUniform2fv wrap_glProgramUniform2fv -#define glProgramUniform2fvEXT wrap_glProgramUniform2fvEXT -#define glProgramUniform2i wrap_glProgramUniform2i -#define glProgramUniform2iEXT wrap_glProgramUniform2iEXT -#define glProgramUniform2iv wrap_glProgramUniform2iv -#define glProgramUniform2ivEXT wrap_glProgramUniform2ivEXT -#define glProgramUniform2ui wrap_glProgramUniform2ui -#define glProgramUniform2uiEXT wrap_glProgramUniform2uiEXT -#define glProgramUniform2uiv wrap_glProgramUniform2uiv -#define glProgramUniform2uivEXT wrap_glProgramUniform2uivEXT -#define glProgramUniform3f wrap_glProgramUniform3f -#define glProgramUniform3fEXT wrap_glProgramUniform3fEXT -#define glProgramUniform3fv wrap_glProgramUniform3fv -#define glProgramUniform3fvEXT wrap_glProgramUniform3fvEXT -#define glProgramUniform3i wrap_glProgramUniform3i -#define glProgramUniform3iEXT wrap_glProgramUniform3iEXT -#define glProgramUniform3iv wrap_glProgramUniform3iv -#define glProgramUniform3ivEXT wrap_glProgramUniform3ivEXT -#define glProgramUniform3ui wrap_glProgramUniform3ui -#define glProgramUniform3uiEXT wrap_glProgramUniform3uiEXT -#define glProgramUniform3uiv wrap_glProgramUniform3uiv -#define glProgramUniform3uivEXT wrap_glProgramUniform3uivEXT -#define glProgramUniform4f wrap_glProgramUniform4f -#define glProgramUniform4fEXT wrap_glProgramUniform4fEXT -#define glProgramUniform4fv wrap_glProgramUniform4fv -#define glProgramUniform4fvEXT wrap_glProgramUniform4fvEXT -#define glProgramUniform4i wrap_glProgramUniform4i -#define glProgramUniform4iEXT wrap_glProgramUniform4iEXT -#define glProgramUniform4iv wrap_glProgramUniform4iv -#define glProgramUniform4ivEXT wrap_glProgramUniform4ivEXT -#define glProgramUniform4ui wrap_glProgramUniform4ui -#define glProgramUniform4uiEXT wrap_glProgramUniform4uiEXT -#define glProgramUniform4uiv wrap_glProgramUniform4uiv -#define glProgramUniform4uivEXT wrap_glProgramUniform4uivEXT -#define glProgramUniformHandleui64NV wrap_glProgramUniformHandleui64NV -#define glProgramUniformHandleui64vNV wrap_glProgramUniformHandleui64vNV -#define glProgramUniformMatrix2fv wrap_glProgramUniformMatrix2fv -#define glProgramUniformMatrix2fvEXT wrap_glProgramUniformMatrix2fvEXT -#define glProgramUniformMatrix2x3fv wrap_glProgramUniformMatrix2x3fv -#define glProgramUniformMatrix2x3fvEXT wrap_glProgramUniformMatrix2x3fvEXT -#define glProgramUniformMatrix2x4fv wrap_glProgramUniformMatrix2x4fv -#define glProgramUniformMatrix2x4fvEXT wrap_glProgramUniformMatrix2x4fvEXT -#define glProgramUniformMatrix3fv wrap_glProgramUniformMatrix3fv -#define glProgramUniformMatrix3fvEXT wrap_glProgramUniformMatrix3fvEXT -#define glProgramUniformMatrix3x2fv wrap_glProgramUniformMatrix3x2fv -#define glProgramUniformMatrix3x2fvEXT wrap_glProgramUniformMatrix3x2fvEXT -#define glProgramUniformMatrix3x4fv wrap_glProgramUniformMatrix3x4fv -#define glProgramUniformMatrix3x4fvEXT wrap_glProgramUniformMatrix3x4fvEXT -#define glProgramUniformMatrix4fv wrap_glProgramUniformMatrix4fv -#define glProgramUniformMatrix4fvEXT wrap_glProgramUniformMatrix4fvEXT -#define glProgramUniformMatrix4x2fv wrap_glProgramUniformMatrix4x2fv -#define glProgramUniformMatrix4x2fvEXT wrap_glProgramUniformMatrix4x2fvEXT -#define glProgramUniformMatrix4x3fv wrap_glProgramUniformMatrix4x3fv -#define glProgramUniformMatrix4x3fvEXT wrap_glProgramUniformMatrix4x3fvEXT -#define glPushDebugGroup wrap_glPushDebugGroup -#define glPushDebugGroupKHR wrap_glPushDebugGroupKHR -#define glPushGroupMarkerEXT wrap_glPushGroupMarkerEXT -#define glPushMatrix wrap_glPushMatrix -#define glQueryCounterEXT wrap_glQueryCounterEXT -#define glQueryMatrixxOES wrap_glQueryMatrixxOES -#define glRasterSamplesEXT wrap_glRasterSamplesEXT -#define glReadBuffer wrap_glReadBuffer -#define glReadBufferIndexedEXT wrap_glReadBufferIndexedEXT -#define glReadBufferNV wrap_glReadBufferNV -#define glReadPixels wrap_glReadPixels -#define glReadnPixels wrap_glReadnPixels -#define glReadnPixelsEXT wrap_glReadnPixelsEXT -#define glReadnPixelsKHR wrap_glReadnPixelsKHR -#define glReleaseShaderCompiler wrap_glReleaseShaderCompiler -#define glRenderbufferStorage wrap_glRenderbufferStorage -#define glRenderbufferStorageMultisample wrap_glRenderbufferStorageMultisample -#define glRenderbufferStorageMultisampleANGLE wrap_glRenderbufferStorageMultisampleANGLE -#define glRenderbufferStorageMultisampleAPPLE wrap_glRenderbufferStorageMultisampleAPPLE -#define glRenderbufferStorageMultisampleEXT wrap_glRenderbufferStorageMultisampleEXT -#define glRenderbufferStorageMultisampleIMG wrap_glRenderbufferStorageMultisampleIMG -#define glRenderbufferStorageMultisampleNV wrap_glRenderbufferStorageMultisampleNV -#define glRenderbufferStorageOES wrap_glRenderbufferStorageOES -#define glResolveDepthValuesNV wrap_glResolveDepthValuesNV -#define glResolveMultisampleFramebufferAPPLE wrap_glResolveMultisampleFramebufferAPPLE -#define glResumeTransformFeedback wrap_glResumeTransformFeedback -#define glRotatef wrap_glRotatef -#define glRotatex wrap_glRotatex -#define glRotatexOES wrap_glRotatexOES -#define glSampleCoverage wrap_glSampleCoverage -#define glSampleCoveragex wrap_glSampleCoveragex -#define glSampleCoveragexOES wrap_glSampleCoveragexOES -#define glSampleMaski wrap_glSampleMaski -#define glSamplerParameterIiv wrap_glSamplerParameterIiv -#define glSamplerParameterIivEXT wrap_glSamplerParameterIivEXT -#define glSamplerParameterIivOES wrap_glSamplerParameterIivOES -#define glSamplerParameterIuiv wrap_glSamplerParameterIuiv -#define glSamplerParameterIuivEXT wrap_glSamplerParameterIuivEXT -#define glSamplerParameterIuivOES wrap_glSamplerParameterIuivOES -#define glSamplerParameterf wrap_glSamplerParameterf -#define glSamplerParameterfv wrap_glSamplerParameterfv -#define glSamplerParameteri wrap_glSamplerParameteri -#define glSamplerParameteriv wrap_glSamplerParameteriv -#define glScalef wrap_glScalef -#define glScalex wrap_glScalex -#define glScalexOES wrap_glScalexOES -#define glScissor wrap_glScissor -#define glScissorArrayvNV wrap_glScissorArrayvNV -#define glScissorIndexedNV wrap_glScissorIndexedNV -#define glScissorIndexedvNV wrap_glScissorIndexedvNV -#define glSelectPerfMonitorCountersAMD wrap_glSelectPerfMonitorCountersAMD -#define glSetFenceNV wrap_glSetFenceNV -#define glShadeModel wrap_glShadeModel -#define glShaderBinary wrap_glShaderBinary -#define glShaderSource wrap_glShaderSource -#define glStartTilingQCOM wrap_glStartTilingQCOM -#define glStencilFillPathInstancedNV wrap_glStencilFillPathInstancedNV -#define glStencilFillPathNV wrap_glStencilFillPathNV -#define glStencilFunc wrap_glStencilFunc -#define glStencilFuncSeparate wrap_glStencilFuncSeparate -#define glStencilMask wrap_glStencilMask -#define glStencilMaskSeparate wrap_glStencilMaskSeparate -#define glStencilOp wrap_glStencilOp -#define glStencilOpSeparate wrap_glStencilOpSeparate -#define glStencilStrokePathInstancedNV wrap_glStencilStrokePathInstancedNV -#define glStencilStrokePathNV wrap_glStencilStrokePathNV -#define glStencilThenCoverFillPathInstancedNV wrap_glStencilThenCoverFillPathInstancedNV -#define glStencilThenCoverFillPathNV wrap_glStencilThenCoverFillPathNV -#define glStencilThenCoverStrokePathInstancedNV wrap_glStencilThenCoverStrokePathInstancedNV -#define glStencilThenCoverStrokePathNV wrap_glStencilThenCoverStrokePathNV -#define glSubpixelPrecisionBiasNV wrap_glSubpixelPrecisionBiasNV -#define glTestFenceNV wrap_glTestFenceNV -#define glTexBuffer wrap_glTexBuffer -#define glTexBufferEXT wrap_glTexBufferEXT -#define glTexBufferOES wrap_glTexBufferOES -#define glTexBufferRange wrap_glTexBufferRange -#define glTexBufferRangeEXT wrap_glTexBufferRangeEXT -#define glTexBufferRangeOES wrap_glTexBufferRangeOES -#define glTexCoordPointer wrap_glTexCoordPointer -#define glTexEnvf wrap_glTexEnvf -#define glTexEnvfv wrap_glTexEnvfv -#define glTexEnvi wrap_glTexEnvi -#define glTexEnviv wrap_glTexEnviv -#define glTexEnvx wrap_glTexEnvx -#define glTexEnvxOES wrap_glTexEnvxOES -#define glTexEnvxv wrap_glTexEnvxv -#define glTexEnvxvOES wrap_glTexEnvxvOES -#define glTexGenfOES wrap_glTexGenfOES -#define glTexGenfvOES wrap_glTexGenfvOES -#define glTexGeniOES wrap_glTexGeniOES -#define glTexGenivOES wrap_glTexGenivOES -#define glTexGenxOES wrap_glTexGenxOES -#define glTexGenxvOES wrap_glTexGenxvOES -#define glTexImage2D wrap_glTexImage2D -#define glTexImage3D wrap_glTexImage3D -#define glTexImage3DOES wrap_glTexImage3DOES -#define glTexPageCommitmentEXT wrap_glTexPageCommitmentEXT -#define glTexParameterIiv wrap_glTexParameterIiv -#define glTexParameterIivEXT wrap_glTexParameterIivEXT -#define glTexParameterIivOES wrap_glTexParameterIivOES -#define glTexParameterIuiv wrap_glTexParameterIuiv -#define glTexParameterIuivEXT wrap_glTexParameterIuivEXT -#define glTexParameterIuivOES wrap_glTexParameterIuivOES -#define glTexParameterf wrap_glTexParameterf -#define glTexParameterfv wrap_glTexParameterfv -#define glTexParameteri wrap_glTexParameteri -#define glTexParameteriv wrap_glTexParameteriv -#define glTexParameterx wrap_glTexParameterx -#define glTexParameterxOES wrap_glTexParameterxOES -#define glTexParameterxv wrap_glTexParameterxv -#define glTexParameterxvOES wrap_glTexParameterxvOES -#define glTexStorage1DEXT wrap_glTexStorage1DEXT -#define glTexStorage2D wrap_glTexStorage2D -#define glTexStorage2DEXT wrap_glTexStorage2DEXT -#define glTexStorage2DMultisample wrap_glTexStorage2DMultisample -#define glTexStorage3D wrap_glTexStorage3D -#define glTexStorage3DEXT wrap_glTexStorage3DEXT -#define glTexStorage3DMultisample wrap_glTexStorage3DMultisample -#define glTexStorage3DMultisampleOES wrap_glTexStorage3DMultisampleOES -#define glTexSubImage2D wrap_glTexSubImage2D -#define glTexSubImage3D wrap_glTexSubImage3D -#define glTexSubImage3DOES wrap_glTexSubImage3DOES -#define glTextureStorage1DEXT wrap_glTextureStorage1DEXT -#define glTextureStorage2DEXT wrap_glTextureStorage2DEXT -#define glTextureStorage3DEXT wrap_glTextureStorage3DEXT -#define glTextureViewEXT wrap_glTextureViewEXT -#define glTextureViewOES wrap_glTextureViewOES -#define glTransformFeedbackVaryings wrap_glTransformFeedbackVaryings -#define glTransformPathNV wrap_glTransformPathNV -#define glTranslatef wrap_glTranslatef -#define glTranslatex wrap_glTranslatex -#define glTranslatexOES wrap_glTranslatexOES -#define glUniform1f wrap_glUniform1f -#define glUniform1fv wrap_glUniform1fv -#define glUniform1i wrap_glUniform1i -#define glUniform1iv wrap_glUniform1iv -#define glUniform1ui wrap_glUniform1ui -#define glUniform1uiv wrap_glUniform1uiv -#define glUniform2f wrap_glUniform2f -#define glUniform2fv wrap_glUniform2fv -#define glUniform2i wrap_glUniform2i -#define glUniform2iv wrap_glUniform2iv -#define glUniform2ui wrap_glUniform2ui -#define glUniform2uiv wrap_glUniform2uiv -#define glUniform3f wrap_glUniform3f -#define glUniform3fv wrap_glUniform3fv -#define glUniform3i wrap_glUniform3i -#define glUniform3iv wrap_glUniform3iv -#define glUniform3ui wrap_glUniform3ui -#define glUniform3uiv wrap_glUniform3uiv -#define glUniform4f wrap_glUniform4f -#define glUniform4fv wrap_glUniform4fv -#define glUniform4i wrap_glUniform4i -#define glUniform4iv wrap_glUniform4iv -#define glUniform4ui wrap_glUniform4ui -#define glUniform4uiv wrap_glUniform4uiv -#define glUniformBlockBinding wrap_glUniformBlockBinding -#define glUniformHandleui64NV wrap_glUniformHandleui64NV -#define glUniformHandleui64vNV wrap_glUniformHandleui64vNV -#define glUniformMatrix2fv wrap_glUniformMatrix2fv -#define glUniformMatrix2x3fv wrap_glUniformMatrix2x3fv -#define glUniformMatrix2x3fvNV wrap_glUniformMatrix2x3fvNV -#define glUniformMatrix2x4fv wrap_glUniformMatrix2x4fv -#define glUniformMatrix2x4fvNV wrap_glUniformMatrix2x4fvNV -#define glUniformMatrix3fv wrap_glUniformMatrix3fv -#define glUniformMatrix3x2fv wrap_glUniformMatrix3x2fv -#define glUniformMatrix3x2fvNV wrap_glUniformMatrix3x2fvNV -#define glUniformMatrix3x4fv wrap_glUniformMatrix3x4fv -#define glUniformMatrix3x4fvNV wrap_glUniformMatrix3x4fvNV -#define glUniformMatrix4fv wrap_glUniformMatrix4fv -#define glUniformMatrix4x2fv wrap_glUniformMatrix4x2fv -#define glUniformMatrix4x2fvNV wrap_glUniformMatrix4x2fvNV -#define glUniformMatrix4x3fv wrap_glUniformMatrix4x3fv -#define glUniformMatrix4x3fvNV wrap_glUniformMatrix4x3fvNV -#define glUnmapBuffer wrap_glUnmapBuffer -#define glUnmapBufferOES wrap_glUnmapBufferOES -#define glUseProgram wrap_glUseProgram -#define glUseProgramStages wrap_glUseProgramStages -#define glUseProgramStagesEXT wrap_glUseProgramStagesEXT -#define glValidateProgram wrap_glValidateProgram -#define glValidateProgramPipeline wrap_glValidateProgramPipeline -#define glValidateProgramPipelineEXT wrap_glValidateProgramPipelineEXT -#define glVertexAttrib1f wrap_glVertexAttrib1f -#define glVertexAttrib1fv wrap_glVertexAttrib1fv -#define glVertexAttrib2f wrap_glVertexAttrib2f -#define glVertexAttrib2fv wrap_glVertexAttrib2fv -#define glVertexAttrib3f wrap_glVertexAttrib3f -#define glVertexAttrib3fv wrap_glVertexAttrib3fv -#define glVertexAttrib4f wrap_glVertexAttrib4f -#define glVertexAttrib4fv wrap_glVertexAttrib4fv -#define glVertexAttribBinding wrap_glVertexAttribBinding -#define glVertexAttribDivisor wrap_glVertexAttribDivisor -#define glVertexAttribDivisorANGLE wrap_glVertexAttribDivisorANGLE -#define glVertexAttribDivisorEXT wrap_glVertexAttribDivisorEXT -#define glVertexAttribDivisorNV wrap_glVertexAttribDivisorNV -#define glVertexAttribFormat wrap_glVertexAttribFormat -#define glVertexAttribI4i wrap_glVertexAttribI4i -#define glVertexAttribI4iv wrap_glVertexAttribI4iv -#define glVertexAttribI4ui wrap_glVertexAttribI4ui -#define glVertexAttribI4uiv wrap_glVertexAttribI4uiv -#define glVertexAttribIFormat wrap_glVertexAttribIFormat -#define glVertexAttribIPointer wrap_glVertexAttribIPointer -#define glVertexAttribPointer wrap_glVertexAttribPointer -#define glVertexBindingDivisor wrap_glVertexBindingDivisor -#define glVertexPointer wrap_glVertexPointer -#define glViewport wrap_glViewport -#define glViewportArrayvNV wrap_glViewportArrayvNV -#define glViewportIndexedfNV wrap_glViewportIndexedfNV -#define glViewportIndexedfvNV wrap_glViewportIndexedfvNV -#define glWaitSync wrap_glWaitSync -#define glWaitSyncAPPLE wrap_glWaitSyncAPPLE -#define glWeightPathsNV wrap_glWeightPathsNV -#define glWeightPointerOES wrap_glWeightPointerOES
\ No newline at end of file diff --git a/libs/hwui/debug/gles_stubs.in b/libs/hwui/debug/gles_stubs.in deleted file mode 100644 index 7cba0c115814..000000000000 --- a/libs/hwui/debug/gles_stubs.in +++ /dev/null @@ -1,1629 +0,0 @@ -void API_ENTRY(glActiveTexture)(GLenum texture) { - CALL_GL_API(glActiveTexture, texture); -} -void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) { - CALL_GL_API(glAttachShader, program, shader); -} -void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar *name) { - CALL_GL_API(glBindAttribLocation, program, index, name); -} -void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) { - CALL_GL_API(glBindBuffer, target, buffer); -} -void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer) { - CALL_GL_API(glBindFramebuffer, target, framebuffer); -} -void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer) { - CALL_GL_API(glBindRenderbuffer, target, renderbuffer); -} -void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) { - CALL_GL_API(glBindTexture, target, texture); -} -void API_ENTRY(glBlendColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { - CALL_GL_API(glBlendColor, red, green, blue, alpha); -} -void API_ENTRY(glBlendEquation)(GLenum mode) { - CALL_GL_API(glBlendEquation, mode); -} -void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) { - CALL_GL_API(glBlendEquationSeparate, modeRGB, modeAlpha); -} -void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) { - CALL_GL_API(glBlendFunc, sfactor, dfactor); -} -void API_ENTRY(glBlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { - CALL_GL_API(glBlendFuncSeparate, sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} -void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const void *data, GLenum usage) { - CALL_GL_API(glBufferData, target, size, data, usage); -} -void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void *data) { - CALL_GL_API(glBufferSubData, target, offset, size, data); -} -GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) { - CALL_GL_API_RETURN(glCheckFramebufferStatus, target); -} -void API_ENTRY(glClear)(GLbitfield mask) { - CALL_GL_API(glClear, mask); -} -void API_ENTRY(glClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { - CALL_GL_API(glClearColor, red, green, blue, alpha); -} -void API_ENTRY(glClearDepthf)(GLfloat d) { - CALL_GL_API(glClearDepthf, d); -} -void API_ENTRY(glClearStencil)(GLint s) { - CALL_GL_API(glClearStencil, s); -} -void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - CALL_GL_API(glColorMask, red, green, blue, alpha); -} -void API_ENTRY(glCompileShader)(GLuint shader) { - CALL_GL_API(glCompileShader, shader); -} -void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data) { - CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data); -} -void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data) { - CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data); -} -void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border); -} -void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height); -} -GLuint API_ENTRY(glCreateProgram)(void) { - CALL_GL_API_RETURN(glCreateProgram); -} -GLuint API_ENTRY(glCreateShader)(GLenum type) { - CALL_GL_API_RETURN(glCreateShader, type); -} -void API_ENTRY(glCullFace)(GLenum mode) { - CALL_GL_API(glCullFace, mode); -} -void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint *buffers) { - CALL_GL_API(glDeleteBuffers, n, buffers); -} -void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers) { - CALL_GL_API(glDeleteFramebuffers, n, framebuffers); -} -void API_ENTRY(glDeleteProgram)(GLuint program) { - CALL_GL_API(glDeleteProgram, program); -} -void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers) { - CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers); -} -void API_ENTRY(glDeleteShader)(GLuint shader) { - CALL_GL_API(glDeleteShader, shader); -} -void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint *textures) { - CALL_GL_API(glDeleteTextures, n, textures); -} -void API_ENTRY(glDepthFunc)(GLenum func) { - CALL_GL_API(glDepthFunc, func); -} -void API_ENTRY(glDepthMask)(GLboolean flag) { - CALL_GL_API(glDepthMask, flag); -} -void API_ENTRY(glDepthRangef)(GLfloat n, GLfloat f) { - CALL_GL_API(glDepthRangef, n, f); -} -void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) { - CALL_GL_API(glDetachShader, program, shader); -} -void API_ENTRY(glDisable)(GLenum cap) { - CALL_GL_API(glDisable, cap); -} -void API_ENTRY(glDisableVertexAttribArray)(GLuint index) { - CALL_GL_API(glDisableVertexAttribArray, index); -} -void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) { - CALL_GL_API(glDrawArrays, mode, first, count); -} -void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void *indices) { - CALL_GL_API(glDrawElements, mode, count, type, indices); -} -void API_ENTRY(glEnable)(GLenum cap) { - CALL_GL_API(glEnable, cap); -} -void API_ENTRY(glEnableVertexAttribArray)(GLuint index) { - CALL_GL_API(glEnableVertexAttribArray, index); -} -void API_ENTRY(glFinish)(void) { - CALL_GL_API(glFinish); -} -void API_ENTRY(glFlush)(void) { - CALL_GL_API(glFlush); -} -void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { - CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer); -} -void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { - CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level); -} -void API_ENTRY(glFrontFace)(GLenum mode) { - CALL_GL_API(glFrontFace, mode); -} -void API_ENTRY(glGenBuffers)(GLsizei n, GLuint *buffers) { - CALL_GL_API(glGenBuffers, n, buffers); -} -void API_ENTRY(glGenerateMipmap)(GLenum target) { - CALL_GL_API(glGenerateMipmap, target); -} -void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint *framebuffers) { - CALL_GL_API(glGenFramebuffers, n, framebuffers); -} -void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint *renderbuffers) { - CALL_GL_API(glGenRenderbuffers, n, renderbuffers); -} -void API_ENTRY(glGenTextures)(GLsizei n, GLuint *textures) { - CALL_GL_API(glGenTextures, n, textures); -} -void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) { - CALL_GL_API(glGetActiveAttrib, program, index, bufSize, length, size, type, name); -} -void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) { - CALL_GL_API(glGetActiveUniform, program, index, bufSize, length, size, type, name); -} -void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders) { - CALL_GL_API(glGetAttachedShaders, program, maxCount, count, shaders); -} -GLint API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar *name) { - CALL_GL_API_RETURN(glGetAttribLocation, program, name); -} -void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean *data) { - CALL_GL_API(glGetBooleanv, pname, data); -} -void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetBufferParameteriv, target, pname, params); -} -GLenum API_ENTRY(glGetError)(void) { - CALL_GL_API_RETURN(glGetError); -} -void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat *data) { - CALL_GL_API(glGetFloatv, pname, data); -} -void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params) { - CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params); -} -void API_ENTRY(glGetIntegerv)(GLenum pname, GLint *data) { - CALL_GL_API(glGetIntegerv, pname, data); -} -void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint *params) { - CALL_GL_API(glGetProgramiv, program, pname, params); -} -void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { - CALL_GL_API(glGetProgramInfoLog, program, bufSize, length, infoLog); -} -void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params); -} -void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint *params) { - CALL_GL_API(glGetShaderiv, shader, pname, params); -} -void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { - CALL_GL_API(glGetShaderInfoLog, shader, bufSize, length, infoLog); -} -void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision) { - CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision); -} -void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) { - CALL_GL_API(glGetShaderSource, shader, bufSize, length, source); -} -const GLubyte * API_ENTRY(glGetString)(GLenum name) { - CALL_GL_API_RETURN(glGetString, name); -} -void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetTexParameterfv, target, pname, params); -} -void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexParameteriv, target, pname, params); -} -void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat *params) { - CALL_GL_API(glGetUniformfv, program, location, params); -} -void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint *params) { - CALL_GL_API(glGetUniformiv, program, location, params); -} -GLint API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar *name) { - CALL_GL_API_RETURN(glGetUniformLocation, program, name); -} -void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetVertexAttribfv, index, pname, params); -} -void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint *params) { - CALL_GL_API(glGetVertexAttribiv, index, pname, params); -} -void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, void **pointer) { - CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer); -} -void API_ENTRY(glHint)(GLenum target, GLenum mode) { - CALL_GL_API(glHint, target, mode); -} -GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) { - CALL_GL_API_RETURN(glIsBuffer, buffer); -} -GLboolean API_ENTRY(glIsEnabled)(GLenum cap) { - CALL_GL_API_RETURN(glIsEnabled, cap); -} -GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer) { - CALL_GL_API_RETURN(glIsFramebuffer, framebuffer); -} -GLboolean API_ENTRY(glIsProgram)(GLuint program) { - CALL_GL_API_RETURN(glIsProgram, program); -} -GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer) { - CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer); -} -GLboolean API_ENTRY(glIsShader)(GLuint shader) { - CALL_GL_API_RETURN(glIsShader, shader); -} -GLboolean API_ENTRY(glIsTexture)(GLuint texture) { - CALL_GL_API_RETURN(glIsTexture, texture); -} -void API_ENTRY(glLineWidth)(GLfloat width) { - CALL_GL_API(glLineWidth, width); -} -void API_ENTRY(glLinkProgram)(GLuint program) { - CALL_GL_API(glLinkProgram, program); -} -void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) { - CALL_GL_API(glPixelStorei, pname, param); -} -void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) { - CALL_GL_API(glPolygonOffset, factor, units); -} -void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels) { - CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels); -} -void API_ENTRY(glReleaseShaderCompiler)(void) { - CALL_GL_API(glReleaseShaderCompiler); -} -void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height); -} -void API_ENTRY(glSampleCoverage)(GLfloat value, GLboolean invert) { - CALL_GL_API(glSampleCoverage, value, invert); -} -void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glScissor, x, y, width, height); -} -void API_ENTRY(glShaderBinary)(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length) { - CALL_GL_API(glShaderBinary, count, shaders, binaryformat, binary, length); -} -void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length) { - CALL_GL_API(glShaderSource, shader, count, string, length); -} -void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) { - CALL_GL_API(glStencilFunc, func, ref, mask); -} -void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) { - CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask); -} -void API_ENTRY(glStencilMask)(GLuint mask) { - CALL_GL_API(glStencilMask, mask); -} -void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask) { - CALL_GL_API(glStencilMaskSeparate, face, mask); -} -void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) { - CALL_GL_API(glStencilOp, fail, zfail, zpass); -} -void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) { - CALL_GL_API(glStencilOpSeparate, face, sfail, dpfail, dppass); -} -void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) { - CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels); -} -void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) { - CALL_GL_API(glTexParameterf, target, pname, param); -} -void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) { - CALL_GL_API(glTexParameterfv, target, pname, params); -} -void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glTexParameteri, target, pname, param); -} -void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint *params) { - CALL_GL_API(glTexParameteriv, target, pname, params); -} -void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) { - CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels); -} -void API_ENTRY(glUniform1f)(GLint location, GLfloat v0) { - CALL_GL_API(glUniform1f, location, v0); -} -void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glUniform1fv, location, count, value); -} -void API_ENTRY(glUniform1i)(GLint location, GLint v0) { - CALL_GL_API(glUniform1i, location, v0); -} -void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glUniform1iv, location, count, value); -} -void API_ENTRY(glUniform2f)(GLint location, GLfloat v0, GLfloat v1) { - CALL_GL_API(glUniform2f, location, v0, v1); -} -void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glUniform2fv, location, count, value); -} -void API_ENTRY(glUniform2i)(GLint location, GLint v0, GLint v1) { - CALL_GL_API(glUniform2i, location, v0, v1); -} -void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glUniform2iv, location, count, value); -} -void API_ENTRY(glUniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { - CALL_GL_API(glUniform3f, location, v0, v1, v2); -} -void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glUniform3fv, location, count, value); -} -void API_ENTRY(glUniform3i)(GLint location, GLint v0, GLint v1, GLint v2) { - CALL_GL_API(glUniform3i, location, v0, v1, v2); -} -void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glUniform3iv, location, count, value); -} -void API_ENTRY(glUniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { - CALL_GL_API(glUniform4f, location, v0, v1, v2, v3); -} -void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glUniform4fv, location, count, value); -} -void API_ENTRY(glUniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { - CALL_GL_API(glUniform4i, location, v0, v1, v2, v3); -} -void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glUniform4iv, location, count, value); -} -void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value); -} -void API_ENTRY(glUseProgram)(GLuint program) { - CALL_GL_API(glUseProgram, program); -} -void API_ENTRY(glValidateProgram)(GLuint program) { - CALL_GL_API(glValidateProgram, program); -} -void API_ENTRY(glVertexAttrib1f)(GLuint index, GLfloat x) { - CALL_GL_API(glVertexAttrib1f, index, x); -} -void API_ENTRY(glVertexAttrib1fv)(GLuint index, const GLfloat *v) { - CALL_GL_API(glVertexAttrib1fv, index, v); -} -void API_ENTRY(glVertexAttrib2f)(GLuint index, GLfloat x, GLfloat y) { - CALL_GL_API(glVertexAttrib2f, index, x, y); -} -void API_ENTRY(glVertexAttrib2fv)(GLuint index, const GLfloat *v) { - CALL_GL_API(glVertexAttrib2fv, index, v); -} -void API_ENTRY(glVertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glVertexAttrib3f, index, x, y, z); -} -void API_ENTRY(glVertexAttrib3fv)(GLuint index, const GLfloat *v) { - CALL_GL_API(glVertexAttrib3fv, index, v); -} -void API_ENTRY(glVertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - CALL_GL_API(glVertexAttrib4f, index, x, y, z, w); -} -void API_ENTRY(glVertexAttrib4fv)(GLuint index, const GLfloat *v) { - CALL_GL_API(glVertexAttrib4fv, index, v); -} -void API_ENTRY(glVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer) { - CALL_GL_API(glVertexAttribPointer, index, size, type, normalized, stride, pointer); -} -void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glViewport, x, y, width, height); -} -void API_ENTRY(glReadBuffer)(GLenum src) { - CALL_GL_API(glReadBuffer, src); -} -void API_ENTRY(glDrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices) { - CALL_GL_API(glDrawRangeElements, mode, start, end, count, type, indices); -} -void API_ENTRY(glTexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) { - CALL_GL_API(glTexImage3D, target, level, internalformat, width, height, depth, border, format, type, pixels); -} -void API_ENTRY(glTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels) { - CALL_GL_API(glTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} -void API_ENTRY(glCopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glCopyTexSubImage3D, target, level, xoffset, yoffset, zoffset, x, y, width, height); -} -void API_ENTRY(glCompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data) { - CALL_GL_API(glCompressedTexImage3D, target, level, internalformat, width, height, depth, border, imageSize, data); -} -void API_ENTRY(glCompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) { - CALL_GL_API(glCompressedTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} -void API_ENTRY(glGenQueries)(GLsizei n, GLuint *ids) { - CALL_GL_API(glGenQueries, n, ids); -} -void API_ENTRY(glDeleteQueries)(GLsizei n, const GLuint *ids) { - CALL_GL_API(glDeleteQueries, n, ids); -} -GLboolean API_ENTRY(glIsQuery)(GLuint id) { - CALL_GL_API_RETURN(glIsQuery, id); -} -void API_ENTRY(glBeginQuery)(GLenum target, GLuint id) { - CALL_GL_API(glBeginQuery, target, id); -} -void API_ENTRY(glEndQuery)(GLenum target) { - CALL_GL_API(glEndQuery, target); -} -void API_ENTRY(glGetQueryiv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetQueryiv, target, pname, params); -} -void API_ENTRY(glGetQueryObjectuiv)(GLuint id, GLenum pname, GLuint *params) { - CALL_GL_API(glGetQueryObjectuiv, id, pname, params); -} -GLboolean API_ENTRY(glUnmapBuffer)(GLenum target) { - CALL_GL_API_RETURN(glUnmapBuffer, target); -} -void API_ENTRY(glGetBufferPointerv)(GLenum target, GLenum pname, void **params) { - CALL_GL_API(glGetBufferPointerv, target, pname, params); -} -void API_ENTRY(glDrawBuffers)(GLsizei n, const GLenum *bufs) { - CALL_GL_API(glDrawBuffers, n, bufs); -} -void API_ENTRY(glUniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix2x3fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix3x2fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix2x4fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix4x2fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix3x4fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glUniformMatrix4x3fv, location, count, transpose, value); -} -void API_ENTRY(glBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { - CALL_GL_API(glBlitFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} -void API_ENTRY(glRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorageMultisample, target, samples, internalformat, width, height); -} -void API_ENTRY(glFramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { - CALL_GL_API(glFramebufferTextureLayer, target, attachment, texture, level, layer); -} -void * API_ENTRY(glMapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { - CALL_GL_API_RETURN(glMapBufferRange, target, offset, length, access); -} -void API_ENTRY(glFlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length) { - CALL_GL_API(glFlushMappedBufferRange, target, offset, length); -} -void API_ENTRY(glBindVertexArray)(GLuint array) { - CALL_GL_API(glBindVertexArray, array); -} -void API_ENTRY(glDeleteVertexArrays)(GLsizei n, const GLuint *arrays) { - CALL_GL_API(glDeleteVertexArrays, n, arrays); -} -void API_ENTRY(glGenVertexArrays)(GLsizei n, GLuint *arrays) { - CALL_GL_API(glGenVertexArrays, n, arrays); -} -GLboolean API_ENTRY(glIsVertexArray)(GLuint array) { - CALL_GL_API_RETURN(glIsVertexArray, array); -} -void API_ENTRY(glGetIntegeri_v)(GLenum target, GLuint index, GLint *data) { - CALL_GL_API(glGetIntegeri_v, target, index, data); -} -void API_ENTRY(glBeginTransformFeedback)(GLenum primitiveMode) { - CALL_GL_API(glBeginTransformFeedback, primitiveMode); -} -void API_ENTRY(glEndTransformFeedback)(void) { - CALL_GL_API(glEndTransformFeedback); -} -void API_ENTRY(glBindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { - CALL_GL_API(glBindBufferRange, target, index, buffer, offset, size); -} -void API_ENTRY(glBindBufferBase)(GLenum target, GLuint index, GLuint buffer) { - CALL_GL_API(glBindBufferBase, target, index, buffer); -} -void API_ENTRY(glTransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode) { - CALL_GL_API(glTransformFeedbackVaryings, program, count, varyings, bufferMode); -} -void API_ENTRY(glGetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) { - CALL_GL_API(glGetTransformFeedbackVarying, program, index, bufSize, length, size, type, name); -} -void API_ENTRY(glVertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer) { - CALL_GL_API(glVertexAttribIPointer, index, size, type, stride, pointer); -} -void API_ENTRY(glGetVertexAttribIiv)(GLuint index, GLenum pname, GLint *params) { - CALL_GL_API(glGetVertexAttribIiv, index, pname, params); -} -void API_ENTRY(glGetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint *params) { - CALL_GL_API(glGetVertexAttribIuiv, index, pname, params); -} -void API_ENTRY(glVertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w) { - CALL_GL_API(glVertexAttribI4i, index, x, y, z, w); -} -void API_ENTRY(glVertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { - CALL_GL_API(glVertexAttribI4ui, index, x, y, z, w); -} -void API_ENTRY(glVertexAttribI4iv)(GLuint index, const GLint *v) { - CALL_GL_API(glVertexAttribI4iv, index, v); -} -void API_ENTRY(glVertexAttribI4uiv)(GLuint index, const GLuint *v) { - CALL_GL_API(glVertexAttribI4uiv, index, v); -} -void API_ENTRY(glGetUniformuiv)(GLuint program, GLint location, GLuint *params) { - CALL_GL_API(glGetUniformuiv, program, location, params); -} -GLint API_ENTRY(glGetFragDataLocation)(GLuint program, const GLchar *name) { - CALL_GL_API_RETURN(glGetFragDataLocation, program, name); -} -void API_ENTRY(glUniform1ui)(GLint location, GLuint v0) { - CALL_GL_API(glUniform1ui, location, v0); -} -void API_ENTRY(glUniform2ui)(GLint location, GLuint v0, GLuint v1) { - CALL_GL_API(glUniform2ui, location, v0, v1); -} -void API_ENTRY(glUniform3ui)(GLint location, GLuint v0, GLuint v1, GLuint v2) { - CALL_GL_API(glUniform3ui, location, v0, v1, v2); -} -void API_ENTRY(glUniform4ui)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { - CALL_GL_API(glUniform4ui, location, v0, v1, v2, v3); -} -void API_ENTRY(glUniform1uiv)(GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glUniform1uiv, location, count, value); -} -void API_ENTRY(glUniform2uiv)(GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glUniform2uiv, location, count, value); -} -void API_ENTRY(glUniform3uiv)(GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glUniform3uiv, location, count, value); -} -void API_ENTRY(glUniform4uiv)(GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glUniform4uiv, location, count, value); -} -void API_ENTRY(glClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint *value) { - CALL_GL_API(glClearBufferiv, buffer, drawbuffer, value); -} -void API_ENTRY(glClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint *value) { - CALL_GL_API(glClearBufferuiv, buffer, drawbuffer, value); -} -void API_ENTRY(glClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat *value) { - CALL_GL_API(glClearBufferfv, buffer, drawbuffer, value); -} -void API_ENTRY(glClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { - CALL_GL_API(glClearBufferfi, buffer, drawbuffer, depth, stencil); -} -const GLubyte * API_ENTRY(glGetStringi)(GLenum name, GLuint index) { - CALL_GL_API_RETURN(glGetStringi, name, index); -} -void API_ENTRY(glCopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { - CALL_GL_API(glCopyBufferSubData, readTarget, writeTarget, readOffset, writeOffset, size); -} -void API_ENTRY(glGetUniformIndices)(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices) { - CALL_GL_API(glGetUniformIndices, program, uniformCount, uniformNames, uniformIndices); -} -void API_ENTRY(glGetActiveUniformsiv)(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params) { - CALL_GL_API(glGetActiveUniformsiv, program, uniformCount, uniformIndices, pname, params); -} -GLuint API_ENTRY(glGetUniformBlockIndex)(GLuint program, const GLchar *uniformBlockName) { - CALL_GL_API_RETURN(glGetUniformBlockIndex, program, uniformBlockName); -} -void API_ENTRY(glGetActiveUniformBlockiv)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params) { - CALL_GL_API(glGetActiveUniformBlockiv, program, uniformBlockIndex, pname, params); -} -void API_ENTRY(glGetActiveUniformBlockName)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) { - CALL_GL_API(glGetActiveUniformBlockName, program, uniformBlockIndex, bufSize, length, uniformBlockName); -} -void API_ENTRY(glUniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) { - CALL_GL_API(glUniformBlockBinding, program, uniformBlockIndex, uniformBlockBinding); -} -void API_ENTRY(glDrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) { - CALL_GL_API(glDrawArraysInstanced, mode, first, count, instancecount); -} -void API_ENTRY(glDrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount) { - CALL_GL_API(glDrawElementsInstanced, mode, count, type, indices, instancecount); -} -GLsync API_ENTRY(glFenceSync)(GLenum condition, GLbitfield flags) { - CALL_GL_API_RETURN(glFenceSync, condition, flags); -} -GLboolean API_ENTRY(glIsSync)(GLsync sync) { - CALL_GL_API_RETURN(glIsSync, sync); -} -void API_ENTRY(glDeleteSync)(GLsync sync) { - CALL_GL_API(glDeleteSync, sync); -} -GLenum API_ENTRY(glClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) { - CALL_GL_API_RETURN(glClientWaitSync, sync, flags, timeout); -} -void API_ENTRY(glWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) { - CALL_GL_API(glWaitSync, sync, flags, timeout); -} -void API_ENTRY(glGetInteger64v)(GLenum pname, GLint64 *data) { - CALL_GL_API(glGetInteger64v, pname, data); -} -void API_ENTRY(glGetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) { - CALL_GL_API(glGetSynciv, sync, pname, bufSize, length, values); -} -void API_ENTRY(glGetInteger64i_v)(GLenum target, GLuint index, GLint64 *data) { - CALL_GL_API(glGetInteger64i_v, target, index, data); -} -void API_ENTRY(glGetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 *params) { - CALL_GL_API(glGetBufferParameteri64v, target, pname, params); -} -void API_ENTRY(glGenSamplers)(GLsizei count, GLuint *samplers) { - CALL_GL_API(glGenSamplers, count, samplers); -} -void API_ENTRY(glDeleteSamplers)(GLsizei count, const GLuint *samplers) { - CALL_GL_API(glDeleteSamplers, count, samplers); -} -GLboolean API_ENTRY(glIsSampler)(GLuint sampler) { - CALL_GL_API_RETURN(glIsSampler, sampler); -} -void API_ENTRY(glBindSampler)(GLuint unit, GLuint sampler) { - CALL_GL_API(glBindSampler, unit, sampler); -} -void API_ENTRY(glSamplerParameteri)(GLuint sampler, GLenum pname, GLint param) { - CALL_GL_API(glSamplerParameteri, sampler, pname, param); -} -void API_ENTRY(glSamplerParameteriv)(GLuint sampler, GLenum pname, const GLint *param) { - CALL_GL_API(glSamplerParameteriv, sampler, pname, param); -} -void API_ENTRY(glSamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param) { - CALL_GL_API(glSamplerParameterf, sampler, pname, param); -} -void API_ENTRY(glSamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat *param) { - CALL_GL_API(glSamplerParameterfv, sampler, pname, param); -} -void API_ENTRY(glGetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint *params) { - CALL_GL_API(glGetSamplerParameteriv, sampler, pname, params); -} -void API_ENTRY(glGetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetSamplerParameterfv, sampler, pname, params); -} -void API_ENTRY(glVertexAttribDivisor)(GLuint index, GLuint divisor) { - CALL_GL_API(glVertexAttribDivisor, index, divisor); -} -void API_ENTRY(glBindTransformFeedback)(GLenum target, GLuint id) { - CALL_GL_API(glBindTransformFeedback, target, id); -} -void API_ENTRY(glDeleteTransformFeedbacks)(GLsizei n, const GLuint *ids) { - CALL_GL_API(glDeleteTransformFeedbacks, n, ids); -} -void API_ENTRY(glGenTransformFeedbacks)(GLsizei n, GLuint *ids) { - CALL_GL_API(glGenTransformFeedbacks, n, ids); -} -GLboolean API_ENTRY(glIsTransformFeedback)(GLuint id) { - CALL_GL_API_RETURN(glIsTransformFeedback, id); -} -void API_ENTRY(glPauseTransformFeedback)(void) { - CALL_GL_API(glPauseTransformFeedback); -} -void API_ENTRY(glResumeTransformFeedback)(void) { - CALL_GL_API(glResumeTransformFeedback); -} -void API_ENTRY(glGetProgramBinary)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) { - CALL_GL_API(glGetProgramBinary, program, bufSize, length, binaryFormat, binary); -} -void API_ENTRY(glProgramBinary)(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length) { - CALL_GL_API(glProgramBinary, program, binaryFormat, binary, length); -} -void API_ENTRY(glProgramParameteri)(GLuint program, GLenum pname, GLint value) { - CALL_GL_API(glProgramParameteri, program, pname, value); -} -void API_ENTRY(glInvalidateFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum *attachments) { - CALL_GL_API(glInvalidateFramebuffer, target, numAttachments, attachments); -} -void API_ENTRY(glInvalidateSubFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glInvalidateSubFramebuffer, target, numAttachments, attachments, x, y, width, height); -} -void API_ENTRY(glTexStorage2D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glTexStorage2D, target, levels, internalformat, width, height); -} -void API_ENTRY(glTexStorage3D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - CALL_GL_API(glTexStorage3D, target, levels, internalformat, width, height, depth); -} -void API_ENTRY(glGetInternalformativ)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params) { - CALL_GL_API(glGetInternalformativ, target, internalformat, pname, bufSize, params); -} -void API_ENTRY(glDispatchCompute)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) { - CALL_GL_API(glDispatchCompute, num_groups_x, num_groups_y, num_groups_z); -} -void API_ENTRY(glDispatchComputeIndirect)(GLintptr indirect) { - CALL_GL_API(glDispatchComputeIndirect, indirect); -} -void API_ENTRY(glDrawArraysIndirect)(GLenum mode, const void *indirect) { - CALL_GL_API(glDrawArraysIndirect, mode, indirect); -} -void API_ENTRY(glDrawElementsIndirect)(GLenum mode, GLenum type, const void *indirect) { - CALL_GL_API(glDrawElementsIndirect, mode, type, indirect); -} -void API_ENTRY(glFramebufferParameteri)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glFramebufferParameteri, target, pname, param); -} -void API_ENTRY(glGetFramebufferParameteriv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetFramebufferParameteriv, target, pname, params); -} -void API_ENTRY(glGetProgramInterfaceiv)(GLuint program, GLenum programInterface, GLenum pname, GLint *params) { - CALL_GL_API(glGetProgramInterfaceiv, program, programInterface, pname, params); -} -GLuint API_ENTRY(glGetProgramResourceIndex)(GLuint program, GLenum programInterface, const GLchar *name) { - CALL_GL_API_RETURN(glGetProgramResourceIndex, program, programInterface, name); -} -void API_ENTRY(glGetProgramResourceName)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) { - CALL_GL_API(glGetProgramResourceName, program, programInterface, index, bufSize, length, name); -} -void API_ENTRY(glGetProgramResourceiv)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params) { - CALL_GL_API(glGetProgramResourceiv, program, programInterface, index, propCount, props, bufSize, length, params); -} -GLint API_ENTRY(glGetProgramResourceLocation)(GLuint program, GLenum programInterface, const GLchar *name) { - CALL_GL_API_RETURN(glGetProgramResourceLocation, program, programInterface, name); -} -void API_ENTRY(glUseProgramStages)(GLuint pipeline, GLbitfield stages, GLuint program) { - CALL_GL_API(glUseProgramStages, pipeline, stages, program); -} -void API_ENTRY(glActiveShaderProgram)(GLuint pipeline, GLuint program) { - CALL_GL_API(glActiveShaderProgram, pipeline, program); -} -GLuint API_ENTRY(glCreateShaderProgramv)(GLenum type, GLsizei count, const GLchar *const*strings) { - CALL_GL_API_RETURN(glCreateShaderProgramv, type, count, strings); -} -void API_ENTRY(glBindProgramPipeline)(GLuint pipeline) { - CALL_GL_API(glBindProgramPipeline, pipeline); -} -void API_ENTRY(glDeleteProgramPipelines)(GLsizei n, const GLuint *pipelines) { - CALL_GL_API(glDeleteProgramPipelines, n, pipelines); -} -void API_ENTRY(glGenProgramPipelines)(GLsizei n, GLuint *pipelines) { - CALL_GL_API(glGenProgramPipelines, n, pipelines); -} -GLboolean API_ENTRY(glIsProgramPipeline)(GLuint pipeline) { - CALL_GL_API_RETURN(glIsProgramPipeline, pipeline); -} -void API_ENTRY(glGetProgramPipelineiv)(GLuint pipeline, GLenum pname, GLint *params) { - CALL_GL_API(glGetProgramPipelineiv, pipeline, pname, params); -} -void API_ENTRY(glProgramUniform1i)(GLuint program, GLint location, GLint v0) { - CALL_GL_API(glProgramUniform1i, program, location, v0); -} -void API_ENTRY(glProgramUniform2i)(GLuint program, GLint location, GLint v0, GLint v1) { - CALL_GL_API(glProgramUniform2i, program, location, v0, v1); -} -void API_ENTRY(glProgramUniform3i)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { - CALL_GL_API(glProgramUniform3i, program, location, v0, v1, v2); -} -void API_ENTRY(glProgramUniform4i)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { - CALL_GL_API(glProgramUniform4i, program, location, v0, v1, v2, v3); -} -void API_ENTRY(glProgramUniform1ui)(GLuint program, GLint location, GLuint v0) { - CALL_GL_API(glProgramUniform1ui, program, location, v0); -} -void API_ENTRY(glProgramUniform2ui)(GLuint program, GLint location, GLuint v0, GLuint v1) { - CALL_GL_API(glProgramUniform2ui, program, location, v0, v1); -} -void API_ENTRY(glProgramUniform3ui)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { - CALL_GL_API(glProgramUniform3ui, program, location, v0, v1, v2); -} -void API_ENTRY(glProgramUniform4ui)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { - CALL_GL_API(glProgramUniform4ui, program, location, v0, v1, v2, v3); -} -void API_ENTRY(glProgramUniform1f)(GLuint program, GLint location, GLfloat v0) { - CALL_GL_API(glProgramUniform1f, program, location, v0); -} -void API_ENTRY(glProgramUniform2f)(GLuint program, GLint location, GLfloat v0, GLfloat v1) { - CALL_GL_API(glProgramUniform2f, program, location, v0, v1); -} -void API_ENTRY(glProgramUniform3f)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { - CALL_GL_API(glProgramUniform3f, program, location, v0, v1, v2); -} -void API_ENTRY(glProgramUniform4f)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { - CALL_GL_API(glProgramUniform4f, program, location, v0, v1, v2, v3); -} -void API_ENTRY(glProgramUniform1iv)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform1iv, program, location, count, value); -} -void API_ENTRY(glProgramUniform2iv)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform2iv, program, location, count, value); -} -void API_ENTRY(glProgramUniform3iv)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform3iv, program, location, count, value); -} -void API_ENTRY(glProgramUniform4iv)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform4iv, program, location, count, value); -} -void API_ENTRY(glProgramUniform1uiv)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform1uiv, program, location, count, value); -} -void API_ENTRY(glProgramUniform2uiv)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform2uiv, program, location, count, value); -} -void API_ENTRY(glProgramUniform3uiv)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform3uiv, program, location, count, value); -} -void API_ENTRY(glProgramUniform4uiv)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform4uiv, program, location, count, value); -} -void API_ENTRY(glProgramUniform1fv)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform1fv, program, location, count, value); -} -void API_ENTRY(glProgramUniform2fv)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform2fv, program, location, count, value); -} -void API_ENTRY(glProgramUniform3fv)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform3fv, program, location, count, value); -} -void API_ENTRY(glProgramUniform4fv)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform4fv, program, location, count, value); -} -void API_ENTRY(glProgramUniformMatrix2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix2fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix3fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix4fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix2x3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix2x3fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix3x2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix3x2fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix2x4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix2x4fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix4x2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix4x2fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix3x4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix3x4fv, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix4x3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix4x3fv, program, location, count, transpose, value); -} -void API_ENTRY(glValidateProgramPipeline)(GLuint pipeline) { - CALL_GL_API(glValidateProgramPipeline, pipeline); -} -void API_ENTRY(glGetProgramPipelineInfoLog)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { - CALL_GL_API(glGetProgramPipelineInfoLog, pipeline, bufSize, length, infoLog); -} -void API_ENTRY(glBindImageTexture)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) { - CALL_GL_API(glBindImageTexture, unit, texture, level, layered, layer, access, format); -} -void API_ENTRY(glGetBooleani_v)(GLenum target, GLuint index, GLboolean *data) { - CALL_GL_API(glGetBooleani_v, target, index, data); -} -void API_ENTRY(glMemoryBarrier)(GLbitfield barriers) { - CALL_GL_API(glMemoryBarrier, barriers); -} -void API_ENTRY(glMemoryBarrierByRegion)(GLbitfield barriers) { - CALL_GL_API(glMemoryBarrierByRegion, barriers); -} -void API_ENTRY(glTexStorage2DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { - CALL_GL_API(glTexStorage2DMultisample, target, samples, internalformat, width, height, fixedsamplelocations); -} -void API_ENTRY(glGetMultisamplefv)(GLenum pname, GLuint index, GLfloat *val) { - CALL_GL_API(glGetMultisamplefv, pname, index, val); -} -void API_ENTRY(glSampleMaski)(GLuint maskNumber, GLbitfield mask) { - CALL_GL_API(glSampleMaski, maskNumber, mask); -} -void API_ENTRY(glGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexLevelParameteriv, target, level, pname, params); -} -void API_ENTRY(glGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetTexLevelParameterfv, target, level, pname, params); -} -void API_ENTRY(glBindVertexBuffer)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { - CALL_GL_API(glBindVertexBuffer, bindingindex, buffer, offset, stride); -} -void API_ENTRY(glVertexAttribFormat)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { - CALL_GL_API(glVertexAttribFormat, attribindex, size, type, normalized, relativeoffset); -} -void API_ENTRY(glVertexAttribIFormat)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { - CALL_GL_API(glVertexAttribIFormat, attribindex, size, type, relativeoffset); -} -void API_ENTRY(glVertexAttribBinding)(GLuint attribindex, GLuint bindingindex) { - CALL_GL_API(glVertexAttribBinding, attribindex, bindingindex); -} -void API_ENTRY(glVertexBindingDivisor)(GLuint bindingindex, GLuint divisor) { - CALL_GL_API(glVertexBindingDivisor, bindingindex, divisor); -} -void API_ENTRY(glBlendBarrier)(void) { - CALL_GL_API(glBlendBarrier); -} -void API_ENTRY(glCopyImageSubData)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { - CALL_GL_API(glCopyImageSubData, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); -} -void API_ENTRY(glDebugMessageControl)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled) { - CALL_GL_API(glDebugMessageControl, source, type, severity, count, ids, enabled); -} -void API_ENTRY(glDebugMessageInsert)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf) { - CALL_GL_API(glDebugMessageInsert, source, type, id, severity, length, buf); -} -void API_ENTRY(glDebugMessageCallback)(GLDEBUGPROC callback, const void *userParam) { - CALL_GL_API(glDebugMessageCallback, callback, userParam); -} -GLuint API_ENTRY(glGetDebugMessageLog)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) { - CALL_GL_API_RETURN(glGetDebugMessageLog, count, bufSize, sources, types, ids, severities, lengths, messageLog); -} -void API_ENTRY(glPushDebugGroup)(GLenum source, GLuint id, GLsizei length, const GLchar *message) { - CALL_GL_API(glPushDebugGroup, source, id, length, message); -} -void API_ENTRY(glPopDebugGroup)(void) { - CALL_GL_API(glPopDebugGroup); -} -void API_ENTRY(glObjectLabel)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label) { - CALL_GL_API(glObjectLabel, identifier, name, length, label); -} -void API_ENTRY(glGetObjectLabel)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) { - CALL_GL_API(glGetObjectLabel, identifier, name, bufSize, length, label); -} -void API_ENTRY(glObjectPtrLabel)(const void *ptr, GLsizei length, const GLchar *label) { - CALL_GL_API(glObjectPtrLabel, ptr, length, label); -} -void API_ENTRY(glGetObjectPtrLabel)(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) { - CALL_GL_API(glGetObjectPtrLabel, ptr, bufSize, length, label); -} -void API_ENTRY(glGetPointerv)(GLenum pname, void **params) { - CALL_GL_API(glGetPointerv, pname, params); -} -void API_ENTRY(glEnablei)(GLenum target, GLuint index) { - CALL_GL_API(glEnablei, target, index); -} -void API_ENTRY(glDisablei)(GLenum target, GLuint index) { - CALL_GL_API(glDisablei, target, index); -} -void API_ENTRY(glBlendEquationi)(GLuint buf, GLenum mode) { - CALL_GL_API(glBlendEquationi, buf, mode); -} -void API_ENTRY(glBlendEquationSeparatei)(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { - CALL_GL_API(glBlendEquationSeparatei, buf, modeRGB, modeAlpha); -} -void API_ENTRY(glBlendFunci)(GLuint buf, GLenum src, GLenum dst) { - CALL_GL_API(glBlendFunci, buf, src, dst); -} -void API_ENTRY(glBlendFuncSeparatei)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - CALL_GL_API(glBlendFuncSeparatei, buf, srcRGB, dstRGB, srcAlpha, dstAlpha); -} -void API_ENTRY(glColorMaski)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { - CALL_GL_API(glColorMaski, index, r, g, b, a); -} -GLboolean API_ENTRY(glIsEnabledi)(GLenum target, GLuint index) { - CALL_GL_API_RETURN(glIsEnabledi, target, index); -} -void API_ENTRY(glDrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) { - CALL_GL_API(glDrawElementsBaseVertex, mode, count, type, indices, basevertex); -} -void API_ENTRY(glDrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) { - CALL_GL_API(glDrawRangeElementsBaseVertex, mode, start, end, count, type, indices, basevertex); -} -void API_ENTRY(glDrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex) { - CALL_GL_API(glDrawElementsInstancedBaseVertex, mode, count, type, indices, instancecount, basevertex); -} -void API_ENTRY(glFramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level) { - CALL_GL_API(glFramebufferTexture, target, attachment, texture, level); -} -void API_ENTRY(glPrimitiveBoundingBox)(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { - CALL_GL_API(glPrimitiveBoundingBox, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); -} -GLenum API_ENTRY(glGetGraphicsResetStatus)(void) { - CALL_GL_API_RETURN(glGetGraphicsResetStatus); -} -void API_ENTRY(glReadnPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) { - CALL_GL_API(glReadnPixels, x, y, width, height, format, type, bufSize, data); -} -void API_ENTRY(glGetnUniformfv)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params) { - CALL_GL_API(glGetnUniformfv, program, location, bufSize, params); -} -void API_ENTRY(glGetnUniformiv)(GLuint program, GLint location, GLsizei bufSize, GLint *params) { - CALL_GL_API(glGetnUniformiv, program, location, bufSize, params); -} -void API_ENTRY(glGetnUniformuiv)(GLuint program, GLint location, GLsizei bufSize, GLuint *params) { - CALL_GL_API(glGetnUniformuiv, program, location, bufSize, params); -} -void API_ENTRY(glMinSampleShading)(GLfloat value) { - CALL_GL_API(glMinSampleShading, value); -} -void API_ENTRY(glPatchParameteri)(GLenum pname, GLint value) { - CALL_GL_API(glPatchParameteri, pname, value); -} -void API_ENTRY(glTexParameterIiv)(GLenum target, GLenum pname, const GLint *params) { - CALL_GL_API(glTexParameterIiv, target, pname, params); -} -void API_ENTRY(glTexParameterIuiv)(GLenum target, GLenum pname, const GLuint *params) { - CALL_GL_API(glTexParameterIuiv, target, pname, params); -} -void API_ENTRY(glGetTexParameterIiv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexParameterIiv, target, pname, params); -} -void API_ENTRY(glGetTexParameterIuiv)(GLenum target, GLenum pname, GLuint *params) { - CALL_GL_API(glGetTexParameterIuiv, target, pname, params); -} -void API_ENTRY(glSamplerParameterIiv)(GLuint sampler, GLenum pname, const GLint *param) { - CALL_GL_API(glSamplerParameterIiv, sampler, pname, param); -} -void API_ENTRY(glSamplerParameterIuiv)(GLuint sampler, GLenum pname, const GLuint *param) { - CALL_GL_API(glSamplerParameterIuiv, sampler, pname, param); -} -void API_ENTRY(glGetSamplerParameterIiv)(GLuint sampler, GLenum pname, GLint *params) { - CALL_GL_API(glGetSamplerParameterIiv, sampler, pname, params); -} -void API_ENTRY(glGetSamplerParameterIuiv)(GLuint sampler, GLenum pname, GLuint *params) { - CALL_GL_API(glGetSamplerParameterIuiv, sampler, pname, params); -} -void API_ENTRY(glTexBuffer)(GLenum target, GLenum internalformat, GLuint buffer) { - CALL_GL_API(glTexBuffer, target, internalformat, buffer); -} -void API_ENTRY(glTexBufferRange)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { - CALL_GL_API(glTexBufferRange, target, internalformat, buffer, offset, size); -} -void API_ENTRY(glTexStorage3DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { - CALL_GL_API(glTexStorage3DMultisample, target, samples, internalformat, width, height, depth, fixedsamplelocations); -} -void API_ENTRY(glBlendBarrierKHR)(void) { - CALL_GL_API(glBlendBarrierKHR); -} -void API_ENTRY(glDebugMessageControlKHR)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled) { - CALL_GL_API(glDebugMessageControlKHR, source, type, severity, count, ids, enabled); -} -void API_ENTRY(glDebugMessageInsertKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf) { - CALL_GL_API(glDebugMessageInsertKHR, source, type, id, severity, length, buf); -} -void API_ENTRY(glDebugMessageCallbackKHR)(GLDEBUGPROCKHR callback, const void *userParam) { - CALL_GL_API(glDebugMessageCallbackKHR, callback, userParam); -} -GLuint API_ENTRY(glGetDebugMessageLogKHR)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) { - CALL_GL_API_RETURN(glGetDebugMessageLogKHR, count, bufSize, sources, types, ids, severities, lengths, messageLog); -} -void API_ENTRY(glPushDebugGroupKHR)(GLenum source, GLuint id, GLsizei length, const GLchar *message) { - CALL_GL_API(glPushDebugGroupKHR, source, id, length, message); -} -void API_ENTRY(glPopDebugGroupKHR)(void) { - CALL_GL_API(glPopDebugGroupKHR); -} -void API_ENTRY(glObjectLabelKHR)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label) { - CALL_GL_API(glObjectLabelKHR, identifier, name, length, label); -} -void API_ENTRY(glGetObjectLabelKHR)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) { - CALL_GL_API(glGetObjectLabelKHR, identifier, name, bufSize, length, label); -} -void API_ENTRY(glObjectPtrLabelKHR)(const void *ptr, GLsizei length, const GLchar *label) { - CALL_GL_API(glObjectPtrLabelKHR, ptr, length, label); -} -void API_ENTRY(glGetObjectPtrLabelKHR)(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) { - CALL_GL_API(glGetObjectPtrLabelKHR, ptr, bufSize, length, label); -} -void API_ENTRY(glGetPointervKHR)(GLenum pname, void **params) { - CALL_GL_API(glGetPointervKHR, pname, params); -} -GLenum API_ENTRY(glGetGraphicsResetStatusKHR)(void) { - CALL_GL_API_RETURN(glGetGraphicsResetStatusKHR); -} -void API_ENTRY(glReadnPixelsKHR)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) { - CALL_GL_API(glReadnPixelsKHR, x, y, width, height, format, type, bufSize, data); -} -void API_ENTRY(glGetnUniformfvKHR)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params) { - CALL_GL_API(glGetnUniformfvKHR, program, location, bufSize, params); -} -void API_ENTRY(glGetnUniformivKHR)(GLuint program, GLint location, GLsizei bufSize, GLint *params) { - CALL_GL_API(glGetnUniformivKHR, program, location, bufSize, params); -} -void API_ENTRY(glGetnUniformuivKHR)(GLuint program, GLint location, GLsizei bufSize, GLuint *params) { - CALL_GL_API(glGetnUniformuivKHR, program, location, bufSize, params); -} -void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) { - CALL_GL_API(glEGLImageTargetTexture2DOES, target, image); -} -void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) { - CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image); -} -void API_ENTRY(glCopyImageSubDataOES)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { - CALL_GL_API(glCopyImageSubDataOES, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); -} -void API_ENTRY(glEnableiOES)(GLenum target, GLuint index) { - CALL_GL_API(glEnableiOES, target, index); -} -void API_ENTRY(glDisableiOES)(GLenum target, GLuint index) { - CALL_GL_API(glDisableiOES, target, index); -} -void API_ENTRY(glBlendEquationiOES)(GLuint buf, GLenum mode) { - CALL_GL_API(glBlendEquationiOES, buf, mode); -} -void API_ENTRY(glBlendEquationSeparateiOES)(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { - CALL_GL_API(glBlendEquationSeparateiOES, buf, modeRGB, modeAlpha); -} -void API_ENTRY(glBlendFunciOES)(GLuint buf, GLenum src, GLenum dst) { - CALL_GL_API(glBlendFunciOES, buf, src, dst); -} -void API_ENTRY(glBlendFuncSeparateiOES)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - CALL_GL_API(glBlendFuncSeparateiOES, buf, srcRGB, dstRGB, srcAlpha, dstAlpha); -} -void API_ENTRY(glColorMaskiOES)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { - CALL_GL_API(glColorMaskiOES, index, r, g, b, a); -} -GLboolean API_ENTRY(glIsEnablediOES)(GLenum target, GLuint index) { - CALL_GL_API_RETURN(glIsEnablediOES, target, index); -} -void API_ENTRY(glDrawElementsBaseVertexOES)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) { - CALL_GL_API(glDrawElementsBaseVertexOES, mode, count, type, indices, basevertex); -} -void API_ENTRY(glDrawRangeElementsBaseVertexOES)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) { - CALL_GL_API(glDrawRangeElementsBaseVertexOES, mode, start, end, count, type, indices, basevertex); -} -void API_ENTRY(glDrawElementsInstancedBaseVertexOES)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex) { - CALL_GL_API(glDrawElementsInstancedBaseVertexOES, mode, count, type, indices, instancecount, basevertex); -} -void API_ENTRY(glFramebufferTextureOES)(GLenum target, GLenum attachment, GLuint texture, GLint level) { - CALL_GL_API(glFramebufferTextureOES, target, attachment, texture, level); -} -void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) { - CALL_GL_API(glGetProgramBinaryOES, program, bufSize, length, binaryFormat, binary); -} -void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const void *binary, GLint length) { - CALL_GL_API(glProgramBinaryOES, program, binaryFormat, binary, length); -} -void * API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) { - CALL_GL_API_RETURN(glMapBufferOES, target, access); -} -GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) { - CALL_GL_API_RETURN(glUnmapBufferOES, target); -} -void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, void **params) { - CALL_GL_API(glGetBufferPointervOES, target, pname, params); -} -void API_ENTRY(glPrimitiveBoundingBoxOES)(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { - CALL_GL_API(glPrimitiveBoundingBoxOES, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); -} -void API_ENTRY(glMinSampleShadingOES)(GLfloat value) { - CALL_GL_API(glMinSampleShadingOES, value); -} -void API_ENTRY(glPatchParameteriOES)(GLenum pname, GLint value) { - CALL_GL_API(glPatchParameteriOES, pname, value); -} -void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) { - CALL_GL_API(glTexImage3DOES, target, level, internalformat, width, height, depth, border, format, type, pixels); -} -void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels) { - CALL_GL_API(glTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} -void API_ENTRY(glCopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glCopyTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, x, y, width, height); -} -void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data) { - CALL_GL_API(glCompressedTexImage3DOES, target, level, internalformat, width, height, depth, border, imageSize, data); -} -void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data) { - CALL_GL_API(glCompressedTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} -void API_ENTRY(glFramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { - CALL_GL_API(glFramebufferTexture3DOES, target, attachment, textarget, texture, level, zoffset); -} -void API_ENTRY(glTexParameterIivOES)(GLenum target, GLenum pname, const GLint *params) { - CALL_GL_API(glTexParameterIivOES, target, pname, params); -} -void API_ENTRY(glTexParameterIuivOES)(GLenum target, GLenum pname, const GLuint *params) { - CALL_GL_API(glTexParameterIuivOES, target, pname, params); -} -void API_ENTRY(glGetTexParameterIivOES)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexParameterIivOES, target, pname, params); -} -void API_ENTRY(glGetTexParameterIuivOES)(GLenum target, GLenum pname, GLuint *params) { - CALL_GL_API(glGetTexParameterIuivOES, target, pname, params); -} -void API_ENTRY(glSamplerParameterIivOES)(GLuint sampler, GLenum pname, const GLint *param) { - CALL_GL_API(glSamplerParameterIivOES, sampler, pname, param); -} -void API_ENTRY(glSamplerParameterIuivOES)(GLuint sampler, GLenum pname, const GLuint *param) { - CALL_GL_API(glSamplerParameterIuivOES, sampler, pname, param); -} -void API_ENTRY(glGetSamplerParameterIivOES)(GLuint sampler, GLenum pname, GLint *params) { - CALL_GL_API(glGetSamplerParameterIivOES, sampler, pname, params); -} -void API_ENTRY(glGetSamplerParameterIuivOES)(GLuint sampler, GLenum pname, GLuint *params) { - CALL_GL_API(glGetSamplerParameterIuivOES, sampler, pname, params); -} -void API_ENTRY(glTexBufferOES)(GLenum target, GLenum internalformat, GLuint buffer) { - CALL_GL_API(glTexBufferOES, target, internalformat, buffer); -} -void API_ENTRY(glTexBufferRangeOES)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { - CALL_GL_API(glTexBufferRangeOES, target, internalformat, buffer, offset, size); -} -void API_ENTRY(glTexStorage3DMultisampleOES)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { - CALL_GL_API(glTexStorage3DMultisampleOES, target, samples, internalformat, width, height, depth, fixedsamplelocations); -} -void API_ENTRY(glTextureViewOES)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { - CALL_GL_API(glTextureViewOES, texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); -} -void API_ENTRY(glBindVertexArrayOES)(GLuint array) { - CALL_GL_API(glBindVertexArrayOES, array); -} -void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) { - CALL_GL_API(glDeleteVertexArraysOES, n, arrays); -} -void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) { - CALL_GL_API(glGenVertexArraysOES, n, arrays); -} -GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) { - CALL_GL_API_RETURN(glIsVertexArrayOES, array); -} -void API_ENTRY(glDrawArraysInstancedBaseInstanceEXT)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) { - CALL_GL_API(glDrawArraysInstancedBaseInstanceEXT, mode, first, count, instancecount, baseinstance); -} -void API_ENTRY(glDrawElementsInstancedBaseInstanceEXT)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance) { - CALL_GL_API(glDrawElementsInstancedBaseInstanceEXT, mode, count, type, indices, instancecount, baseinstance); -} -void API_ENTRY(glDrawElementsInstancedBaseVertexBaseInstanceEXT)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) { - CALL_GL_API(glDrawElementsInstancedBaseVertexBaseInstanceEXT, mode, count, type, indices, instancecount, basevertex, baseinstance); -} -void API_ENTRY(glBindFragDataLocationIndexedEXT)(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name) { - CALL_GL_API(glBindFragDataLocationIndexedEXT, program, colorNumber, index, name); -} -void API_ENTRY(glBindFragDataLocationEXT)(GLuint program, GLuint color, const GLchar *name) { - CALL_GL_API(glBindFragDataLocationEXT, program, color, name); -} -GLint API_ENTRY(glGetProgramResourceLocationIndexEXT)(GLuint program, GLenum programInterface, const GLchar *name) { - CALL_GL_API_RETURN(glGetProgramResourceLocationIndexEXT, program, programInterface, name); -} -GLint API_ENTRY(glGetFragDataIndexEXT)(GLuint program, const GLchar *name) { - CALL_GL_API_RETURN(glGetFragDataIndexEXT, program, name); -} -void API_ENTRY(glBufferStorageEXT)(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags) { - CALL_GL_API(glBufferStorageEXT, target, size, data, flags); -} -void API_ENTRY(glCopyImageSubDataEXT)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { - CALL_GL_API(glCopyImageSubDataEXT, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); -} -void API_ENTRY(glLabelObjectEXT)(GLenum type, GLuint object, GLsizei length, const GLchar *label) { - CALL_GL_API(glLabelObjectEXT, type, object, length, label); -} -void API_ENTRY(glGetObjectLabelEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) { - CALL_GL_API(glGetObjectLabelEXT, type, object, bufSize, length, label); -} -void API_ENTRY(glInsertEventMarkerEXT)(GLsizei length, const GLchar *marker) { - CALL_GL_API(glInsertEventMarkerEXT, length, marker); -} -void API_ENTRY(glPushGroupMarkerEXT)(GLsizei length, const GLchar *marker) { - CALL_GL_API(glPushGroupMarkerEXT, length, marker); -} -void API_ENTRY(glPopGroupMarkerEXT)(void) { - CALL_GL_API(glPopGroupMarkerEXT); -} -void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) { - CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments); -} -void API_ENTRY(glGenQueriesEXT)(GLsizei n, GLuint *ids) { - CALL_GL_API(glGenQueriesEXT, n, ids); -} -void API_ENTRY(glDeleteQueriesEXT)(GLsizei n, const GLuint *ids) { - CALL_GL_API(glDeleteQueriesEXT, n, ids); -} -GLboolean API_ENTRY(glIsQueryEXT)(GLuint id) { - CALL_GL_API_RETURN(glIsQueryEXT, id); -} -void API_ENTRY(glBeginQueryEXT)(GLenum target, GLuint id) { - CALL_GL_API(glBeginQueryEXT, target, id); -} -void API_ENTRY(glEndQueryEXT)(GLenum target) { - CALL_GL_API(glEndQueryEXT, target); -} -void API_ENTRY(glQueryCounterEXT)(GLuint id, GLenum target) { - CALL_GL_API(glQueryCounterEXT, id, target); -} -void API_ENTRY(glGetQueryivEXT)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetQueryivEXT, target, pname, params); -} -void API_ENTRY(glGetQueryObjectivEXT)(GLuint id, GLenum pname, GLint *params) { - CALL_GL_API(glGetQueryObjectivEXT, id, pname, params); -} -void API_ENTRY(glGetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint *params) { - CALL_GL_API(glGetQueryObjectuivEXT, id, pname, params); -} -void API_ENTRY(glGetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64 *params) { - CALL_GL_API(glGetQueryObjecti64vEXT, id, pname, params); -} -void API_ENTRY(glGetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64 *params) { - CALL_GL_API(glGetQueryObjectui64vEXT, id, pname, params); -} -void API_ENTRY(glDrawBuffersEXT)(GLsizei n, const GLenum *bufs) { - CALL_GL_API(glDrawBuffersEXT, n, bufs); -} -void API_ENTRY(glEnableiEXT)(GLenum target, GLuint index) { - CALL_GL_API(glEnableiEXT, target, index); -} -void API_ENTRY(glDisableiEXT)(GLenum target, GLuint index) { - CALL_GL_API(glDisableiEXT, target, index); -} -void API_ENTRY(glBlendEquationiEXT)(GLuint buf, GLenum mode) { - CALL_GL_API(glBlendEquationiEXT, buf, mode); -} -void API_ENTRY(glBlendEquationSeparateiEXT)(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { - CALL_GL_API(glBlendEquationSeparateiEXT, buf, modeRGB, modeAlpha); -} -void API_ENTRY(glBlendFunciEXT)(GLuint buf, GLenum src, GLenum dst) { - CALL_GL_API(glBlendFunciEXT, buf, src, dst); -} -void API_ENTRY(glBlendFuncSeparateiEXT)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - CALL_GL_API(glBlendFuncSeparateiEXT, buf, srcRGB, dstRGB, srcAlpha, dstAlpha); -} -void API_ENTRY(glColorMaskiEXT)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { - CALL_GL_API(glColorMaskiEXT, index, r, g, b, a); -} -GLboolean API_ENTRY(glIsEnablediEXT)(GLenum target, GLuint index) { - CALL_GL_API_RETURN(glIsEnablediEXT, target, index); -} -void API_ENTRY(glDrawElementsBaseVertexEXT)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex) { - CALL_GL_API(glDrawElementsBaseVertexEXT, mode, count, type, indices, basevertex); -} -void API_ENTRY(glDrawRangeElementsBaseVertexEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex) { - CALL_GL_API(glDrawRangeElementsBaseVertexEXT, mode, start, end, count, type, indices, basevertex); -} -void API_ENTRY(glDrawElementsInstancedBaseVertexEXT)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex) { - CALL_GL_API(glDrawElementsInstancedBaseVertexEXT, mode, count, type, indices, instancecount, basevertex); -} -void API_ENTRY(glMultiDrawElementsBaseVertexEXT)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex) { - CALL_GL_API(glMultiDrawElementsBaseVertexEXT, mode, count, type, indices, primcount, basevertex); -} -void API_ENTRY(glDrawArraysInstancedEXT)(GLenum mode, GLint start, GLsizei count, GLsizei primcount) { - CALL_GL_API(glDrawArraysInstancedEXT, mode, start, count, primcount); -} -void API_ENTRY(glDrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount) { - CALL_GL_API(glDrawElementsInstancedEXT, mode, count, type, indices, primcount); -} -void API_ENTRY(glFramebufferTextureEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level) { - CALL_GL_API(glFramebufferTextureEXT, target, attachment, texture, level); -} -void API_ENTRY(glVertexAttribDivisorEXT)(GLuint index, GLuint divisor) { - CALL_GL_API(glVertexAttribDivisorEXT, index, divisor); -} -void * API_ENTRY(glMapBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { - CALL_GL_API_RETURN(glMapBufferRangeEXT, target, offset, length, access); -} -void API_ENTRY(glFlushMappedBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length) { - CALL_GL_API(glFlushMappedBufferRangeEXT, target, offset, length); -} -void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount) { - CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount); -} -void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount) { - CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount); -} -void API_ENTRY(glMultiDrawArraysIndirectEXT)(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride) { - CALL_GL_API(glMultiDrawArraysIndirectEXT, mode, indirect, drawcount, stride); -} -void API_ENTRY(glMultiDrawElementsIndirectEXT)(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride) { - CALL_GL_API(glMultiDrawElementsIndirectEXT, mode, type, indirect, drawcount, stride); -} -void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height); -} -void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { - CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples); -} -void API_ENTRY(glReadBufferIndexedEXT)(GLenum src, GLint index) { - CALL_GL_API(glReadBufferIndexedEXT, src, index); -} -void API_ENTRY(glDrawBuffersIndexedEXT)(GLint n, const GLenum *location, const GLint *indices) { - CALL_GL_API(glDrawBuffersIndexedEXT, n, location, indices); -} -void API_ENTRY(glGetIntegeri_vEXT)(GLenum target, GLuint index, GLint *data) { - CALL_GL_API(glGetIntegeri_vEXT, target, index, data); -} -void API_ENTRY(glPrimitiveBoundingBoxEXT)(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { - CALL_GL_API(glPrimitiveBoundingBoxEXT, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); -} -void API_ENTRY(glRasterSamplesEXT)(GLuint samples, GLboolean fixedsamplelocations) { - CALL_GL_API(glRasterSamplesEXT, samples, fixedsamplelocations); -} -GLenum API_ENTRY(glGetGraphicsResetStatusEXT)(void) { - CALL_GL_API_RETURN(glGetGraphicsResetStatusEXT); -} -void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) { - CALL_GL_API(glReadnPixelsEXT, x, y, width, height, format, type, bufSize, data); -} -void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params) { - CALL_GL_API(glGetnUniformfvEXT, program, location, bufSize, params); -} -void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params) { - CALL_GL_API(glGetnUniformivEXT, program, location, bufSize, params); -} -void API_ENTRY(glActiveShaderProgramEXT)(GLuint pipeline, GLuint program) { - CALL_GL_API(glActiveShaderProgramEXT, pipeline, program); -} -void API_ENTRY(glBindProgramPipelineEXT)(GLuint pipeline) { - CALL_GL_API(glBindProgramPipelineEXT, pipeline); -} -GLuint API_ENTRY(glCreateShaderProgramvEXT)(GLenum type, GLsizei count, const GLchar **strings) { - CALL_GL_API_RETURN(glCreateShaderProgramvEXT, type, count, strings); -} -void API_ENTRY(glDeleteProgramPipelinesEXT)(GLsizei n, const GLuint *pipelines) { - CALL_GL_API(glDeleteProgramPipelinesEXT, n, pipelines); -} -void API_ENTRY(glGenProgramPipelinesEXT)(GLsizei n, GLuint *pipelines) { - CALL_GL_API(glGenProgramPipelinesEXT, n, pipelines); -} -void API_ENTRY(glGetProgramPipelineInfoLogEXT)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { - CALL_GL_API(glGetProgramPipelineInfoLogEXT, pipeline, bufSize, length, infoLog); -} -void API_ENTRY(glGetProgramPipelineivEXT)(GLuint pipeline, GLenum pname, GLint *params) { - CALL_GL_API(glGetProgramPipelineivEXT, pipeline, pname, params); -} -GLboolean API_ENTRY(glIsProgramPipelineEXT)(GLuint pipeline) { - CALL_GL_API_RETURN(glIsProgramPipelineEXT, pipeline); -} -void API_ENTRY(glProgramParameteriEXT)(GLuint program, GLenum pname, GLint value) { - CALL_GL_API(glProgramParameteriEXT, program, pname, value); -} -void API_ENTRY(glProgramUniform1fEXT)(GLuint program, GLint location, GLfloat v0) { - CALL_GL_API(glProgramUniform1fEXT, program, location, v0); -} -void API_ENTRY(glProgramUniform1fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform1fvEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform1iEXT)(GLuint program, GLint location, GLint v0) { - CALL_GL_API(glProgramUniform1iEXT, program, location, v0); -} -void API_ENTRY(glProgramUniform1ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform1ivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform2fEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1) { - CALL_GL_API(glProgramUniform2fEXT, program, location, v0, v1); -} -void API_ENTRY(glProgramUniform2fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform2fvEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform2iEXT)(GLuint program, GLint location, GLint v0, GLint v1) { - CALL_GL_API(glProgramUniform2iEXT, program, location, v0, v1); -} -void API_ENTRY(glProgramUniform2ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform2ivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform3fEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { - CALL_GL_API(glProgramUniform3fEXT, program, location, v0, v1, v2); -} -void API_ENTRY(glProgramUniform3fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform3fvEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform3iEXT)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { - CALL_GL_API(glProgramUniform3iEXT, program, location, v0, v1, v2); -} -void API_ENTRY(glProgramUniform3ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform3ivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform4fEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { - CALL_GL_API(glProgramUniform4fEXT, program, location, v0, v1, v2, v3); -} -void API_ENTRY(glProgramUniform4fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) { - CALL_GL_API(glProgramUniform4fvEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform4iEXT)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { - CALL_GL_API(glProgramUniform4iEXT, program, location, v0, v1, v2, v3); -} -void API_ENTRY(glProgramUniform4ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) { - CALL_GL_API(glProgramUniform4ivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniformMatrix2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix2fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix3fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix4fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glUseProgramStagesEXT)(GLuint pipeline, GLbitfield stages, GLuint program) { - CALL_GL_API(glUseProgramStagesEXT, pipeline, stages, program); -} -void API_ENTRY(glValidateProgramPipelineEXT)(GLuint pipeline) { - CALL_GL_API(glValidateProgramPipelineEXT, pipeline); -} -void API_ENTRY(glProgramUniform1uiEXT)(GLuint program, GLint location, GLuint v0) { - CALL_GL_API(glProgramUniform1uiEXT, program, location, v0); -} -void API_ENTRY(glProgramUniform2uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1) { - CALL_GL_API(glProgramUniform2uiEXT, program, location, v0, v1); -} -void API_ENTRY(glProgramUniform3uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { - CALL_GL_API(glProgramUniform3uiEXT, program, location, v0, v1, v2); -} -void API_ENTRY(glProgramUniform4uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { - CALL_GL_API(glProgramUniform4uiEXT, program, location, v0, v1, v2, v3); -} -void API_ENTRY(glProgramUniform1uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform1uivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform2uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform2uivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform3uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform3uivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniform4uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint *value) { - CALL_GL_API(glProgramUniform4uivEXT, program, location, count, value); -} -void API_ENTRY(glProgramUniformMatrix2x3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix2x3fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix3x2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix3x2fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix2x4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix2x4fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix4x2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix4x2fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix3x4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix3x4fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glProgramUniformMatrix4x3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { - CALL_GL_API(glProgramUniformMatrix4x3fvEXT, program, location, count, transpose, value); -} -void API_ENTRY(glTexPageCommitmentEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { - CALL_GL_API(glTexPageCommitmentEXT, target, level, xoffset, yoffset, zoffset, width, height, depth, commit); -} -void API_ENTRY(glPatchParameteriEXT)(GLenum pname, GLint value) { - CALL_GL_API(glPatchParameteriEXT, pname, value); -} -void API_ENTRY(glTexParameterIivEXT)(GLenum target, GLenum pname, const GLint *params) { - CALL_GL_API(glTexParameterIivEXT, target, pname, params); -} -void API_ENTRY(glTexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint *params) { - CALL_GL_API(glTexParameterIuivEXT, target, pname, params); -} -void API_ENTRY(glGetTexParameterIivEXT)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexParameterIivEXT, target, pname, params); -} -void API_ENTRY(glGetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint *params) { - CALL_GL_API(glGetTexParameterIuivEXT, target, pname, params); -} -void API_ENTRY(glSamplerParameterIivEXT)(GLuint sampler, GLenum pname, const GLint *param) { - CALL_GL_API(glSamplerParameterIivEXT, sampler, pname, param); -} -void API_ENTRY(glSamplerParameterIuivEXT)(GLuint sampler, GLenum pname, const GLuint *param) { - CALL_GL_API(glSamplerParameterIuivEXT, sampler, pname, param); -} -void API_ENTRY(glGetSamplerParameterIivEXT)(GLuint sampler, GLenum pname, GLint *params) { - CALL_GL_API(glGetSamplerParameterIivEXT, sampler, pname, params); -} -void API_ENTRY(glGetSamplerParameterIuivEXT)(GLuint sampler, GLenum pname, GLuint *params) { - CALL_GL_API(glGetSamplerParameterIuivEXT, sampler, pname, params); -} -void API_ENTRY(glTexBufferEXT)(GLenum target, GLenum internalformat, GLuint buffer) { - CALL_GL_API(glTexBufferEXT, target, internalformat, buffer); -} -void API_ENTRY(glTexBufferRangeEXT)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { - CALL_GL_API(glTexBufferRangeEXT, target, internalformat, buffer, offset, size); -} -void API_ENTRY(glTexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { - CALL_GL_API(glTexStorage1DEXT, target, levels, internalformat, width); -} -void API_ENTRY(glTexStorage2DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glTexStorage2DEXT, target, levels, internalformat, width, height); -} -void API_ENTRY(glTexStorage3DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - CALL_GL_API(glTexStorage3DEXT, target, levels, internalformat, width, height, depth); -} -void API_ENTRY(glTextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { - CALL_GL_API(glTextureStorage1DEXT, texture, target, levels, internalformat, width); -} -void API_ENTRY(glTextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glTextureStorage2DEXT, texture, target, levels, internalformat, width, height); -} -void API_ENTRY(glTextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - CALL_GL_API(glTextureStorage3DEXT, texture, target, levels, internalformat, width, height, depth); -} -void API_ENTRY(glTextureViewEXT)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { - CALL_GL_API(glTextureViewEXT, texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); -} diff --git a/libs/hwui/debug/gles_undefine.h b/libs/hwui/debug/gles_undefine.h deleted file mode 100644 index e43829d98e38..000000000000 --- a/libs/hwui/debug/gles_undefine.h +++ /dev/null @@ -1,913 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#undef glActiveShaderProgram -#undef glActiveShaderProgramEXT -#undef glActiveTexture -#undef glAlphaFunc -#undef glAlphaFuncQCOM -#undef glAlphaFuncx -#undef glAlphaFuncxOES -#undef glApplyFramebufferAttachmentCMAAINTEL -#undef glAttachShader -#undef glBeginConditionalRenderNV -#undef glBeginPerfMonitorAMD -#undef glBeginPerfQueryINTEL -#undef glBeginQuery -#undef glBeginQueryEXT -#undef glBeginTransformFeedback -#undef glBindAttribLocation -#undef glBindBuffer -#undef glBindBufferBase -#undef glBindBufferRange -#undef glBindFragDataLocationEXT -#undef glBindFragDataLocationIndexedEXT -#undef glBindFramebuffer -#undef glBindFramebufferOES -#undef glBindImageTexture -#undef glBindProgramPipeline -#undef glBindProgramPipelineEXT -#undef glBindRenderbuffer -#undef glBindRenderbufferOES -#undef glBindSampler -#undef glBindTexture -#undef glBindTransformFeedback -#undef glBindVertexArray -#undef glBindVertexArrayOES -#undef glBindVertexBuffer -#undef glBlendBarrier -#undef glBlendBarrierKHR -#undef glBlendBarrierNV -#undef glBlendColor -#undef glBlendEquation -#undef glBlendEquationOES -#undef glBlendEquationSeparate -#undef glBlendEquationSeparateOES -#undef glBlendEquationSeparatei -#undef glBlendEquationSeparateiEXT -#undef glBlendEquationSeparateiOES -#undef glBlendEquationi -#undef glBlendEquationiEXT -#undef glBlendEquationiOES -#undef glBlendFunc -#undef glBlendFuncSeparate -#undef glBlendFuncSeparateOES -#undef glBlendFuncSeparatei -#undef glBlendFuncSeparateiEXT -#undef glBlendFuncSeparateiOES -#undef glBlendFunci -#undef glBlendFunciEXT -#undef glBlendFunciOES -#undef glBlendParameteriNV -#undef glBlitFramebuffer -#undef glBlitFramebufferANGLE -#undef glBlitFramebufferNV -#undef glBufferData -#undef glBufferStorageEXT -#undef glBufferSubData -#undef glCheckFramebufferStatus -#undef glCheckFramebufferStatusOES -#undef glClear -#undef glClearBufferfi -#undef glClearBufferfv -#undef glClearBufferiv -#undef glClearBufferuiv -#undef glClearColor -#undef glClearColorx -#undef glClearColorxOES -#undef glClearDepthf -#undef glClearDepthfOES -#undef glClearDepthx -#undef glClearDepthxOES -#undef glClearStencil -#undef glClientActiveTexture -#undef glClientWaitSync -#undef glClientWaitSyncAPPLE -#undef glClipPlanef -#undef glClipPlanefIMG -#undef glClipPlanefOES -#undef glClipPlanex -#undef glClipPlanexIMG -#undef glClipPlanexOES -#undef glColor4f -#undef glColor4ub -#undef glColor4x -#undef glColor4xOES -#undef glColorMask -#undef glColorMaski -#undef glColorMaskiEXT -#undef glColorMaskiOES -#undef glColorPointer -#undef glCompileShader -#undef glCompressedTexImage2D -#undef glCompressedTexImage3D -#undef glCompressedTexImage3DOES -#undef glCompressedTexSubImage2D -#undef glCompressedTexSubImage3D -#undef glCompressedTexSubImage3DOES -#undef glCopyBufferSubData -#undef glCopyBufferSubDataNV -#undef glCopyImageSubData -#undef glCopyImageSubDataEXT -#undef glCopyImageSubDataOES -#undef glCopyPathNV -#undef glCopyTexImage2D -#undef glCopyTexSubImage2D -#undef glCopyTexSubImage3D -#undef glCopyTexSubImage3DOES -#undef glCopyTextureLevelsAPPLE -#undef glCoverFillPathInstancedNV -#undef glCoverFillPathNV -#undef glCoverStrokePathInstancedNV -#undef glCoverStrokePathNV -#undef glCoverageMaskNV -#undef glCoverageModulationNV -#undef glCoverageModulationTableNV -#undef glCoverageOperationNV -#undef glCreatePerfQueryINTEL -#undef glCreateProgram -#undef glCreateShader -#undef glCreateShaderProgramv -#undef glCreateShaderProgramvEXT -#undef glCullFace -#undef glCurrentPaletteMatrixOES -#undef glDebugMessageCallback -#undef glDebugMessageCallbackKHR -#undef glDebugMessageControl -#undef glDebugMessageControlKHR -#undef glDebugMessageInsert -#undef glDebugMessageInsertKHR -#undef glDeleteBuffers -#undef glDeleteFencesNV -#undef glDeleteFramebuffers -#undef glDeleteFramebuffersOES -#undef glDeletePathsNV -#undef glDeletePerfMonitorsAMD -#undef glDeletePerfQueryINTEL -#undef glDeleteProgram -#undef glDeleteProgramPipelines -#undef glDeleteProgramPipelinesEXT -#undef glDeleteQueries -#undef glDeleteQueriesEXT -#undef glDeleteRenderbuffers -#undef glDeleteRenderbuffersOES -#undef glDeleteSamplers -#undef glDeleteShader -#undef glDeleteSync -#undef glDeleteSyncAPPLE -#undef glDeleteTextures -#undef glDeleteTransformFeedbacks -#undef glDeleteVertexArrays -#undef glDeleteVertexArraysOES -#undef glDepthFunc -#undef glDepthMask -#undef glDepthRangeArrayfvNV -#undef glDepthRangeIndexedfNV -#undef glDepthRangef -#undef glDepthRangefOES -#undef glDepthRangex -#undef glDepthRangexOES -#undef glDetachShader -#undef glDisable -#undef glDisableClientState -#undef glDisableDriverControlQCOM -#undef glDisableVertexAttribArray -#undef glDisablei -#undef glDisableiEXT -#undef glDisableiNV -#undef glDisableiOES -#undef glDiscardFramebufferEXT -#undef glDispatchCompute -#undef glDispatchComputeIndirect -#undef glDrawArrays -#undef glDrawArraysIndirect -#undef glDrawArraysInstanced -#undef glDrawArraysInstancedANGLE -#undef glDrawArraysInstancedBaseInstanceEXT -#undef glDrawArraysInstancedEXT -#undef glDrawArraysInstancedNV -#undef glDrawBuffers -#undef glDrawBuffersEXT -#undef glDrawBuffersIndexedEXT -#undef glDrawBuffersNV -#undef glDrawElements -#undef glDrawElementsBaseVertex -#undef glDrawElementsBaseVertexEXT -#undef glDrawElementsBaseVertexOES -#undef glDrawElementsIndirect -#undef glDrawElementsInstanced -#undef glDrawElementsInstancedANGLE -#undef glDrawElementsInstancedBaseInstanceEXT -#undef glDrawElementsInstancedBaseVertex -#undef glDrawElementsInstancedBaseVertexBaseInstanceEXT -#undef glDrawElementsInstancedBaseVertexEXT -#undef glDrawElementsInstancedBaseVertexOES -#undef glDrawElementsInstancedEXT -#undef glDrawElementsInstancedNV -#undef glDrawRangeElements -#undef glDrawRangeElementsBaseVertex -#undef glDrawRangeElementsBaseVertexEXT -#undef glDrawRangeElementsBaseVertexOES -#undef glDrawTexfOES -#undef glDrawTexfvOES -#undef glDrawTexiOES -#undef glDrawTexivOES -#undef glDrawTexsOES -#undef glDrawTexsvOES -#undef glDrawTexxOES -#undef glDrawTexxvOES -#undef glEGLImageTargetRenderbufferStorageOES -#undef glEGLImageTargetTexture2DOES -#undef glEnable -#undef glEnableClientState -#undef glEnableDriverControlQCOM -#undef glEnableVertexAttribArray -#undef glEnablei -#undef glEnableiEXT -#undef glEnableiNV -#undef glEnableiOES -#undef glEndConditionalRenderNV -#undef glEndPerfMonitorAMD -#undef glEndPerfQueryINTEL -#undef glEndQuery -#undef glEndQueryEXT -#undef glEndTilingQCOM -#undef glEndTransformFeedback -#undef glExtGetBufferPointervQCOM -#undef glExtGetBuffersQCOM -#undef glExtGetFramebuffersQCOM -#undef glExtGetProgramBinarySourceQCOM -#undef glExtGetProgramsQCOM -#undef glExtGetRenderbuffersQCOM -#undef glExtGetShadersQCOM -#undef glExtGetTexLevelParameterivQCOM -#undef glExtGetTexSubImageQCOM -#undef glExtGetTexturesQCOM -#undef glExtIsProgramBinaryQCOM -#undef glExtTexObjectStateOverrideiQCOM -#undef glFenceSync -#undef glFenceSyncAPPLE -#undef glFinish -#undef glFinishFenceNV -#undef glFlush -#undef glFlushMappedBufferRange -#undef glFlushMappedBufferRangeEXT -#undef glFogf -#undef glFogfv -#undef glFogx -#undef glFogxOES -#undef glFogxv -#undef glFogxvOES -#undef glFragmentCoverageColorNV -#undef glFramebufferParameteri -#undef glFramebufferRenderbuffer -#undef glFramebufferRenderbufferOES -#undef glFramebufferSampleLocationsfvNV -#undef glFramebufferTexture -#undef glFramebufferTexture2D -#undef glFramebufferTexture2DMultisampleEXT -#undef glFramebufferTexture2DMultisampleIMG -#undef glFramebufferTexture2DOES -#undef glFramebufferTexture3DOES -#undef glFramebufferTextureEXT -#undef glFramebufferTextureLayer -#undef glFramebufferTextureMultisampleMultiviewOVR -#undef glFramebufferTextureMultiviewOVR -#undef glFramebufferTextureOES -#undef glFrontFace -#undef glFrustumf -#undef glFrustumfOES -#undef glFrustumx -#undef glFrustumxOES -#undef glGenBuffers -#undef glGenFencesNV -#undef glGenFramebuffers -#undef glGenFramebuffersOES -#undef glGenPathsNV -#undef glGenPerfMonitorsAMD -#undef glGenProgramPipelines -#undef glGenProgramPipelinesEXT -#undef glGenQueries -#undef glGenQueriesEXT -#undef glGenRenderbuffers -#undef glGenRenderbuffersOES -#undef glGenSamplers -#undef glGenTextures -#undef glGenTransformFeedbacks -#undef glGenVertexArrays -#undef glGenVertexArraysOES -#undef glGenerateMipmap -#undef glGenerateMipmapOES -#undef glGetActiveAttrib -#undef glGetActiveUniform -#undef glGetActiveUniformBlockName -#undef glGetActiveUniformBlockiv -#undef glGetActiveUniformsiv -#undef glGetAttachedShaders -#undef glGetAttribLocation -#undef glGetBooleani_v -#undef glGetBooleanv -#undef glGetBufferParameteri64v -#undef glGetBufferParameteriv -#undef glGetBufferPointerv -#undef glGetBufferPointervOES -#undef glGetClipPlanef -#undef glGetClipPlanefOES -#undef glGetClipPlanex -#undef glGetClipPlanexOES -#undef glGetCoverageModulationTableNV -#undef glGetDebugMessageLog -#undef glGetDebugMessageLogKHR -#undef glGetDriverControlStringQCOM -#undef glGetDriverControlsQCOM -#undef glGetError -#undef glGetFenceivNV -#undef glGetFirstPerfQueryIdINTEL -#undef glGetFixedv -#undef glGetFixedvOES -#undef glGetFloati_vNV -#undef glGetFloatv -#undef glGetFragDataIndexEXT -#undef glGetFragDataLocation -#undef glGetFramebufferAttachmentParameteriv -#undef glGetFramebufferAttachmentParameterivOES -#undef glGetFramebufferParameteriv -#undef glGetGraphicsResetStatus -#undef glGetGraphicsResetStatusEXT -#undef glGetGraphicsResetStatusKHR -#undef glGetImageHandleNV -#undef glGetInteger64i_v -#undef glGetInteger64v -#undef glGetInteger64vAPPLE -#undef glGetIntegeri_v -#undef glGetIntegeri_vEXT -#undef glGetIntegerv -#undef glGetInternalformatSampleivNV -#undef glGetInternalformativ -#undef glGetLightfv -#undef glGetLightxv -#undef glGetLightxvOES -#undef glGetMaterialfv -#undef glGetMaterialxv -#undef glGetMaterialxvOES -#undef glGetMultisamplefv -#undef glGetNextPerfQueryIdINTEL -#undef glGetObjectLabel -#undef glGetObjectLabelEXT -#undef glGetObjectLabelKHR -#undef glGetObjectPtrLabel -#undef glGetObjectPtrLabelKHR -#undef glGetPathCommandsNV -#undef glGetPathCoordsNV -#undef glGetPathDashArrayNV -#undef glGetPathLengthNV -#undef glGetPathMetricRangeNV -#undef glGetPathMetricsNV -#undef glGetPathParameterfvNV -#undef glGetPathParameterivNV -#undef glGetPathSpacingNV -#undef glGetPerfCounterInfoINTEL -#undef glGetPerfMonitorCounterDataAMD -#undef glGetPerfMonitorCounterInfoAMD -#undef glGetPerfMonitorCounterStringAMD -#undef glGetPerfMonitorCountersAMD -#undef glGetPerfMonitorGroupStringAMD -#undef glGetPerfMonitorGroupsAMD -#undef glGetPerfQueryDataINTEL -#undef glGetPerfQueryIdByNameINTEL -#undef glGetPerfQueryInfoINTEL -#undef glGetPointerv -#undef glGetPointervKHR -#undef glGetProgramBinary -#undef glGetProgramBinaryOES -#undef glGetProgramInfoLog -#undef glGetProgramInterfaceiv -#undef glGetProgramPipelineInfoLog -#undef glGetProgramPipelineInfoLogEXT -#undef glGetProgramPipelineiv -#undef glGetProgramPipelineivEXT -#undef glGetProgramResourceIndex -#undef glGetProgramResourceLocation -#undef glGetProgramResourceLocationIndexEXT -#undef glGetProgramResourceName -#undef glGetProgramResourcefvNV -#undef glGetProgramResourceiv -#undef glGetProgramiv -#undef glGetQueryObjecti64vEXT -#undef glGetQueryObjectivEXT -#undef glGetQueryObjectui64vEXT -#undef glGetQueryObjectuiv -#undef glGetQueryObjectuivEXT -#undef glGetQueryiv -#undef glGetQueryivEXT -#undef glGetRenderbufferParameteriv -#undef glGetRenderbufferParameterivOES -#undef glGetSamplerParameterIiv -#undef glGetSamplerParameterIivEXT -#undef glGetSamplerParameterIivOES -#undef glGetSamplerParameterIuiv -#undef glGetSamplerParameterIuivEXT -#undef glGetSamplerParameterIuivOES -#undef glGetSamplerParameterfv -#undef glGetSamplerParameteriv -#undef glGetShaderInfoLog -#undef glGetShaderPrecisionFormat -#undef glGetShaderSource -#undef glGetShaderiv -#undef glGetString -#undef glGetStringi -#undef glGetSynciv -#undef glGetSyncivAPPLE -#undef glGetTexEnvfv -#undef glGetTexEnviv -#undef glGetTexEnvxv -#undef glGetTexEnvxvOES -#undef glGetTexGenfvOES -#undef glGetTexGenivOES -#undef glGetTexGenxvOES -#undef glGetTexLevelParameterfv -#undef glGetTexLevelParameteriv -#undef glGetTexParameterIiv -#undef glGetTexParameterIivEXT -#undef glGetTexParameterIivOES -#undef glGetTexParameterIuiv -#undef glGetTexParameterIuivEXT -#undef glGetTexParameterIuivOES -#undef glGetTexParameterfv -#undef glGetTexParameteriv -#undef glGetTexParameterxv -#undef glGetTexParameterxvOES -#undef glGetTextureHandleNV -#undef glGetTextureSamplerHandleNV -#undef glGetTransformFeedbackVarying -#undef glGetTranslatedShaderSourceANGLE -#undef glGetUniformBlockIndex -#undef glGetUniformIndices -#undef glGetUniformLocation -#undef glGetUniformfv -#undef glGetUniformiv -#undef glGetUniformuiv -#undef glGetVertexAttribIiv -#undef glGetVertexAttribIuiv -#undef glGetVertexAttribPointerv -#undef glGetVertexAttribfv -#undef glGetVertexAttribiv -#undef glGetnUniformfv -#undef glGetnUniformfvEXT -#undef glGetnUniformfvKHR -#undef glGetnUniformiv -#undef glGetnUniformivEXT -#undef glGetnUniformivKHR -#undef glGetnUniformuiv -#undef glGetnUniformuivKHR -#undef glHint -#undef glInsertEventMarkerEXT -#undef glInterpolatePathsNV -#undef glInvalidateFramebuffer -#undef glInvalidateSubFramebuffer -#undef glIsBuffer -#undef glIsEnabled -#undef glIsEnabledi -#undef glIsEnablediEXT -#undef glIsEnablediNV -#undef glIsEnablediOES -#undef glIsFenceNV -#undef glIsFramebuffer -#undef glIsFramebufferOES -#undef glIsImageHandleResidentNV -#undef glIsPathNV -#undef glIsPointInFillPathNV -#undef glIsPointInStrokePathNV -#undef glIsProgram -#undef glIsProgramPipeline -#undef glIsProgramPipelineEXT -#undef glIsQuery -#undef glIsQueryEXT -#undef glIsRenderbuffer -#undef glIsRenderbufferOES -#undef glIsSampler -#undef glIsShader -#undef glIsSync -#undef glIsSyncAPPLE -#undef glIsTexture -#undef glIsTextureHandleResidentNV -#undef glIsTransformFeedback -#undef glIsVertexArray -#undef glIsVertexArrayOES -#undef glLabelObjectEXT -#undef glLightModelf -#undef glLightModelfv -#undef glLightModelx -#undef glLightModelxOES -#undef glLightModelxv -#undef glLightModelxvOES -#undef glLightf -#undef glLightfv -#undef glLightx -#undef glLightxOES -#undef glLightxv -#undef glLightxvOES -#undef glLineWidth -#undef glLineWidthx -#undef glLineWidthxOES -#undef glLinkProgram -#undef glLoadIdentity -#undef glLoadMatrixf -#undef glLoadMatrixx -#undef glLoadMatrixxOES -#undef glLoadPaletteFromModelViewMatrixOES -#undef glLogicOp -#undef glMakeImageHandleNonResidentNV -#undef glMakeImageHandleResidentNV -#undef glMakeTextureHandleNonResidentNV -#undef glMakeTextureHandleResidentNV -#undef glMapBufferOES -#undef glMapBufferRange -#undef glMapBufferRangeEXT -#undef glMaterialf -#undef glMaterialfv -#undef glMaterialx -#undef glMaterialxOES -#undef glMaterialxv -#undef glMaterialxvOES -#undef glMatrixIndexPointerOES -#undef glMatrixLoad3x2fNV -#undef glMatrixLoad3x3fNV -#undef glMatrixLoadTranspose3x3fNV -#undef glMatrixMode -#undef glMatrixMult3x2fNV -#undef glMatrixMult3x3fNV -#undef glMatrixMultTranspose3x3fNV -#undef glMemoryBarrier -#undef glMemoryBarrierByRegion -#undef glMinSampleShading -#undef glMinSampleShadingOES -#undef glMultMatrixf -#undef glMultMatrixx -#undef glMultMatrixxOES -#undef glMultiDrawArraysEXT -#undef glMultiDrawArraysIndirectEXT -#undef glMultiDrawElementsBaseVertexEXT -#undef glMultiDrawElementsBaseVertexOES -#undef glMultiDrawElementsEXT -#undef glMultiDrawElementsIndirectEXT -#undef glMultiTexCoord4f -#undef glMultiTexCoord4x -#undef glMultiTexCoord4xOES -#undef glNamedFramebufferSampleLocationsfvNV -#undef glNormal3f -#undef glNormal3x -#undef glNormal3xOES -#undef glNormalPointer -#undef glObjectLabel -#undef glObjectLabelKHR -#undef glObjectPtrLabel -#undef glObjectPtrLabelKHR -#undef glOrthof -#undef glOrthofOES -#undef glOrthox -#undef glOrthoxOES -#undef glPatchParameteri -#undef glPatchParameteriEXT -#undef glPatchParameteriOES -#undef glPathCommandsNV -#undef glPathCoordsNV -#undef glPathCoverDepthFuncNV -#undef glPathDashArrayNV -#undef glPathGlyphIndexArrayNV -#undef glPathGlyphIndexRangeNV -#undef glPathGlyphRangeNV -#undef glPathGlyphsNV -#undef glPathMemoryGlyphIndexArrayNV -#undef glPathParameterfNV -#undef glPathParameterfvNV -#undef glPathParameteriNV -#undef glPathParameterivNV -#undef glPathStencilDepthOffsetNV -#undef glPathStencilFuncNV -#undef glPathStringNV -#undef glPathSubCommandsNV -#undef glPathSubCoordsNV -#undef glPauseTransformFeedback -#undef glPixelStorei -#undef glPointAlongPathNV -#undef glPointParameterf -#undef glPointParameterfv -#undef glPointParameterx -#undef glPointParameterxOES -#undef glPointParameterxv -#undef glPointParameterxvOES -#undef glPointSize -#undef glPointSizePointerOES -#undef glPointSizex -#undef glPointSizexOES -#undef glPolygonModeNV -#undef glPolygonOffset -#undef glPolygonOffsetx -#undef glPolygonOffsetxOES -#undef glPopDebugGroup -#undef glPopDebugGroupKHR -#undef glPopGroupMarkerEXT -#undef glPopMatrix -#undef glPrimitiveBoundingBox -#undef glPrimitiveBoundingBoxEXT -#undef glPrimitiveBoundingBoxOES -#undef glProgramBinary -#undef glProgramBinaryOES -#undef glProgramParameteri -#undef glProgramParameteriEXT -#undef glProgramPathFragmentInputGenNV -#undef glProgramUniform1f -#undef glProgramUniform1fEXT -#undef glProgramUniform1fv -#undef glProgramUniform1fvEXT -#undef glProgramUniform1i -#undef glProgramUniform1iEXT -#undef glProgramUniform1iv -#undef glProgramUniform1ivEXT -#undef glProgramUniform1ui -#undef glProgramUniform1uiEXT -#undef glProgramUniform1uiv -#undef glProgramUniform1uivEXT -#undef glProgramUniform2f -#undef glProgramUniform2fEXT -#undef glProgramUniform2fv -#undef glProgramUniform2fvEXT -#undef glProgramUniform2i -#undef glProgramUniform2iEXT -#undef glProgramUniform2iv -#undef glProgramUniform2ivEXT -#undef glProgramUniform2ui -#undef glProgramUniform2uiEXT -#undef glProgramUniform2uiv -#undef glProgramUniform2uivEXT -#undef glProgramUniform3f -#undef glProgramUniform3fEXT -#undef glProgramUniform3fv -#undef glProgramUniform3fvEXT -#undef glProgramUniform3i -#undef glProgramUniform3iEXT -#undef glProgramUniform3iv -#undef glProgramUniform3ivEXT -#undef glProgramUniform3ui -#undef glProgramUniform3uiEXT -#undef glProgramUniform3uiv -#undef glProgramUniform3uivEXT -#undef glProgramUniform4f -#undef glProgramUniform4fEXT -#undef glProgramUniform4fv -#undef glProgramUniform4fvEXT -#undef glProgramUniform4i -#undef glProgramUniform4iEXT -#undef glProgramUniform4iv -#undef glProgramUniform4ivEXT -#undef glProgramUniform4ui -#undef glProgramUniform4uiEXT -#undef glProgramUniform4uiv -#undef glProgramUniform4uivEXT -#undef glProgramUniformHandleui64NV -#undef glProgramUniformHandleui64vNV -#undef glProgramUniformMatrix2fv -#undef glProgramUniformMatrix2fvEXT -#undef glProgramUniformMatrix2x3fv -#undef glProgramUniformMatrix2x3fvEXT -#undef glProgramUniformMatrix2x4fv -#undef glProgramUniformMatrix2x4fvEXT -#undef glProgramUniformMatrix3fv -#undef glProgramUniformMatrix3fvEXT -#undef glProgramUniformMatrix3x2fv -#undef glProgramUniformMatrix3x2fvEXT -#undef glProgramUniformMatrix3x4fv -#undef glProgramUniformMatrix3x4fvEXT -#undef glProgramUniformMatrix4fv -#undef glProgramUniformMatrix4fvEXT -#undef glProgramUniformMatrix4x2fv -#undef glProgramUniformMatrix4x2fvEXT -#undef glProgramUniformMatrix4x3fv -#undef glProgramUniformMatrix4x3fvEXT -#undef glPushDebugGroup -#undef glPushDebugGroupKHR -#undef glPushGroupMarkerEXT -#undef glPushMatrix -#undef glQueryCounterEXT -#undef glQueryMatrixxOES -#undef glRasterSamplesEXT -#undef glReadBuffer -#undef glReadBufferIndexedEXT -#undef glReadBufferNV -#undef glReadPixels -#undef glReadnPixels -#undef glReadnPixelsEXT -#undef glReadnPixelsKHR -#undef glReleaseShaderCompiler -#undef glRenderbufferStorage -#undef glRenderbufferStorageMultisample -#undef glRenderbufferStorageMultisampleANGLE -#undef glRenderbufferStorageMultisampleAPPLE -#undef glRenderbufferStorageMultisampleEXT -#undef glRenderbufferStorageMultisampleIMG -#undef glRenderbufferStorageMultisampleNV -#undef glRenderbufferStorageOES -#undef glResolveDepthValuesNV -#undef glResolveMultisampleFramebufferAPPLE -#undef glResumeTransformFeedback -#undef glRotatef -#undef glRotatex -#undef glRotatexOES -#undef glSampleCoverage -#undef glSampleCoveragex -#undef glSampleCoveragexOES -#undef glSampleMaski -#undef glSamplerParameterIiv -#undef glSamplerParameterIivEXT -#undef glSamplerParameterIivOES -#undef glSamplerParameterIuiv -#undef glSamplerParameterIuivEXT -#undef glSamplerParameterIuivOES -#undef glSamplerParameterf -#undef glSamplerParameterfv -#undef glSamplerParameteri -#undef glSamplerParameteriv -#undef glScalef -#undef glScalex -#undef glScalexOES -#undef glScissor -#undef glScissorArrayvNV -#undef glScissorIndexedNV -#undef glScissorIndexedvNV -#undef glSelectPerfMonitorCountersAMD -#undef glSetFenceNV -#undef glShadeModel -#undef glShaderBinary -#undef glShaderSource -#undef glStartTilingQCOM -#undef glStencilFillPathInstancedNV -#undef glStencilFillPathNV -#undef glStencilFunc -#undef glStencilFuncSeparate -#undef glStencilMask -#undef glStencilMaskSeparate -#undef glStencilOp -#undef glStencilOpSeparate -#undef glStencilStrokePathInstancedNV -#undef glStencilStrokePathNV -#undef glStencilThenCoverFillPathInstancedNV -#undef glStencilThenCoverFillPathNV -#undef glStencilThenCoverStrokePathInstancedNV -#undef glStencilThenCoverStrokePathNV -#undef glSubpixelPrecisionBiasNV -#undef glTestFenceNV -#undef glTexBuffer -#undef glTexBufferEXT -#undef glTexBufferOES -#undef glTexBufferRange -#undef glTexBufferRangeEXT -#undef glTexBufferRangeOES -#undef glTexCoordPointer -#undef glTexEnvf -#undef glTexEnvfv -#undef glTexEnvi -#undef glTexEnviv -#undef glTexEnvx -#undef glTexEnvxOES -#undef glTexEnvxv -#undef glTexEnvxvOES -#undef glTexGenfOES -#undef glTexGenfvOES -#undef glTexGeniOES -#undef glTexGenivOES -#undef glTexGenxOES -#undef glTexGenxvOES -#undef glTexImage2D -#undef glTexImage3D -#undef glTexImage3DOES -#undef glTexPageCommitmentEXT -#undef glTexParameterIiv -#undef glTexParameterIivEXT -#undef glTexParameterIivOES -#undef glTexParameterIuiv -#undef glTexParameterIuivEXT -#undef glTexParameterIuivOES -#undef glTexParameterf -#undef glTexParameterfv -#undef glTexParameteri -#undef glTexParameteriv -#undef glTexParameterx -#undef glTexParameterxOES -#undef glTexParameterxv -#undef glTexParameterxvOES -#undef glTexStorage1DEXT -#undef glTexStorage2D -#undef glTexStorage2DEXT -#undef glTexStorage2DMultisample -#undef glTexStorage3D -#undef glTexStorage3DEXT -#undef glTexStorage3DMultisample -#undef glTexStorage3DMultisampleOES -#undef glTexSubImage2D -#undef glTexSubImage3D -#undef glTexSubImage3DOES -#undef glTextureStorage1DEXT -#undef glTextureStorage2DEXT -#undef glTextureStorage3DEXT -#undef glTextureViewEXT -#undef glTextureViewOES -#undef glTransformFeedbackVaryings -#undef glTransformPathNV -#undef glTranslatef -#undef glTranslatex -#undef glTranslatexOES -#undef glUniform1f -#undef glUniform1fv -#undef glUniform1i -#undef glUniform1iv -#undef glUniform1ui -#undef glUniform1uiv -#undef glUniform2f -#undef glUniform2fv -#undef glUniform2i -#undef glUniform2iv -#undef glUniform2ui -#undef glUniform2uiv -#undef glUniform3f -#undef glUniform3fv -#undef glUniform3i -#undef glUniform3iv -#undef glUniform3ui -#undef glUniform3uiv -#undef glUniform4f -#undef glUniform4fv -#undef glUniform4i -#undef glUniform4iv -#undef glUniform4ui -#undef glUniform4uiv -#undef glUniformBlockBinding -#undef glUniformHandleui64NV -#undef glUniformHandleui64vNV -#undef glUniformMatrix2fv -#undef glUniformMatrix2x3fv -#undef glUniformMatrix2x3fvNV -#undef glUniformMatrix2x4fv -#undef glUniformMatrix2x4fvNV -#undef glUniformMatrix3fv -#undef glUniformMatrix3x2fv -#undef glUniformMatrix3x2fvNV -#undef glUniformMatrix3x4fv -#undef glUniformMatrix3x4fvNV -#undef glUniformMatrix4fv -#undef glUniformMatrix4x2fv -#undef glUniformMatrix4x2fvNV -#undef glUniformMatrix4x3fv -#undef glUniformMatrix4x3fvNV -#undef glUnmapBuffer -#undef glUnmapBufferOES -#undef glUseProgram -#undef glUseProgramStages -#undef glUseProgramStagesEXT -#undef glValidateProgram -#undef glValidateProgramPipeline -#undef glValidateProgramPipelineEXT -#undef glVertexAttrib1f -#undef glVertexAttrib1fv -#undef glVertexAttrib2f -#undef glVertexAttrib2fv -#undef glVertexAttrib3f -#undef glVertexAttrib3fv -#undef glVertexAttrib4f -#undef glVertexAttrib4fv -#undef glVertexAttribBinding -#undef glVertexAttribDivisor -#undef glVertexAttribDivisorANGLE -#undef glVertexAttribDivisorEXT -#undef glVertexAttribDivisorNV -#undef glVertexAttribFormat -#undef glVertexAttribI4i -#undef glVertexAttribI4iv -#undef glVertexAttribI4ui -#undef glVertexAttribI4uiv -#undef glVertexAttribIFormat -#undef glVertexAttribIPointer -#undef glVertexAttribPointer -#undef glVertexBindingDivisor -#undef glVertexPointer -#undef glViewport -#undef glViewportArrayvNV -#undef glViewportIndexedfNV -#undef glViewportIndexedfvNV -#undef glWaitSync -#undef glWaitSyncAPPLE -#undef glWeightPathsNV -#undef glWeightPointerOES diff --git a/libs/hwui/debug/nullegl.cpp b/libs/hwui/debug/nullegl.cpp deleted file mode 100644 index ca47f8fd22ef..000000000000 --- a/libs/hwui/debug/nullegl.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <EGL/egl.h> -#include <EGL/eglext.h> - -#include <pthread.h> -#include <stdlib.h> -#include <string.h> - -static EGLDisplay gDisplay = (EGLDisplay)1; -static EGLSyncKHR gFence = (EGLSyncKHR)1; - -typedef struct { - EGLSurface surface; - EGLContext context; -} ThreadState; - -static pthread_key_t ThreadStateKey; -static pthread_once_t ThreadStateSetupOnce = PTHREAD_ONCE_INIT; - -static void destroyThreadState(void* state) { - free(state); -} - -static void makeThreadState() { - pthread_key_create(&ThreadStateKey, destroyThreadState); -} - -ThreadState* getThreadState() { - ThreadState* ptr; - pthread_once(&ThreadStateSetupOnce, makeThreadState); - if ((ptr = (ThreadState*)pthread_getspecific(ThreadStateKey)) == NULL) { - ptr = (ThreadState*)calloc(1, sizeof(ThreadState)); - ptr->context = EGL_NO_CONTEXT; - ptr->surface = EGL_NO_SURFACE; - pthread_setspecific(ThreadStateKey, ptr); - } - return ptr; -} - -EGLint eglGetError(void) { - return EGL_SUCCESS; -} - -EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id) { - return gDisplay; -} - -EGLBoolean eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) { - return EGL_TRUE; -} - -EGLBoolean eglTerminate(EGLDisplay dpy) { - return EGL_TRUE; -} - -const char* eglQueryString(EGLDisplay dpy, EGLint name) { - if (name == EGL_EXTENSIONS) { - return "EGL_KHR_swap_buffers_with_damage"; - } - return ""; -} - -EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, - EGLint config_size, EGLint* num_config) { - memset(configs, 9, sizeof(EGLConfig) * config_size); - *num_config = config_size; - return EGL_TRUE; -} - -EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, - const EGLint* attrib_list) { - return (EGLSurface)malloc(sizeof(void*)); -} - -EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list) { - return (EGLSurface)malloc(sizeof(void*)); -} - -EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { - free(surface); - return EGL_TRUE; -} - -EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value) { - *value = 1000; - return EGL_TRUE; -} - -EGLBoolean eglReleaseThread(void) { - return EGL_TRUE; -} - -EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) { - return EGL_TRUE; -} - -EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) { - return EGL_TRUE; -} - -EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, - const EGLint* attrib_list) { - return (EGLContext)malloc(sizeof(void*)); -} -EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) { - free(ctx); - return EGL_TRUE; -} - -EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) { - ThreadState* state = getThreadState(); - state->surface = draw; - state->context = ctx; - return EGL_TRUE; -} - -EGLContext eglGetCurrentContext(void) { - return getThreadState()->context; -} - -EGLSurface eglGetCurrentSurface(EGLint readdraw) { - return getThreadState()->surface; -} - -EGLDisplay eglGetCurrentDisplay(void) { - return gDisplay; -} - -EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { - return EGL_TRUE; -} - -EGLBoolean eglSwapBuffersWithDamageKHR(EGLDisplay dpy, EGLSurface surface, EGLint* rects, - EGLint rectCount) { - return EGL_TRUE; -} - -EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, - EGLClientBuffer buffer, const EGLint* attrib_list) { - return (EGLImageKHR)malloc(sizeof(EGLImageKHR)); -} - -EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint* attrib_list) { - return gFence; -} - -EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) { - return EGL_TRUE; -} - -EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) { - return EGL_CONDITION_SATISFIED_KHR; -} - -EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) { - free(image); - return EGL_TRUE; -} - -void eglBeginFrame(EGLDisplay dpy, EGLSurface surface) {} diff --git a/libs/hwui/debug/wrap_gles.cpp b/libs/hwui/debug/wrap_gles.cpp deleted file mode 100644 index 8dc946e5667b..000000000000 --- a/libs/hwui/debug/wrap_gles.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "GlesDriver.h" - -using namespace android::uirenderer::debug; - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - -#define API_ENTRY(x) x -#define CALL_GL_API(api, ...) GlesDriver::get()->api##_(__VA_ARGS__) -#define CALL_GL_API_RETURN(api, ...) return GlesDriver::get()->api##_(__VA_ARGS__) - -#include "gles_stubs.in" - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN diff --git a/libs/hwui/debug/wrap_gles.h b/libs/hwui/debug/wrap_gles.h deleted file mode 100644 index 3da6e802d178..000000000000 --- a/libs/hwui/debug/wrap_gles.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// #include'ing this file is bad, bad things should be compile errors -#ifdef HWUI_GLES_WRAP_ENABLED -#error wrap_gles.h should only be used as an auto-included header, don't directly #include it -#endif -#define HWUI_GLES_WRAP_ENABLED - -#include <GLES/gl.h> -#include <GLES/glext.h> -#include <GLES2/gl2.h> -#include <GLES2/gl2ext.h> -#include <GLES3/gl3.h> -#include <GLES3/gl31.h> -#include <GLES3/gl32.h> - -// constant used by the NULL GPU implementation as well as HWUI's unit tests -constexpr int NULL_GPU_MAX_TEXTURE_SIZE = 2048; - -// Generate stubs that route all the calls to our function table -#include "gles_redefine.h" - -#define GL_ENTRY(ret, api, ...) ret api(__VA_ARGS__); - -#include "gles_decls.in" -#undef GL_ENTRY diff --git a/libs/hwui/hwui/AnimatedImageDrawable.cpp b/libs/hwui/hwui/AnimatedImageDrawable.cpp index 8d4e7e09b458..4544beae5df8 100644 --- a/libs/hwui/hwui/AnimatedImageDrawable.cpp +++ b/libs/hwui/hwui/AnimatedImageDrawable.cpp @@ -64,7 +64,7 @@ bool AnimatedImageDrawable::nextSnapshotReady() const { // Only called on the RenderThread while UI thread is locked. bool AnimatedImageDrawable::isDirty(nsecs_t* outDelay) { *outDelay = 0; - const nsecs_t currentTime = systemTime(CLOCK_MONOTONIC); + const nsecs_t currentTime = systemTime(SYSTEM_TIME_MONOTONIC); const nsecs_t lastWallTime = mLastWallTime; mLastWallTime = currentTime; @@ -244,7 +244,7 @@ int AnimatedImageDrawable::drawStaging(SkCanvas* canvas) { bool update = false; { - const nsecs_t currentTime = systemTime(CLOCK_MONOTONIC); + const nsecs_t currentTime = systemTime(SYSTEM_TIME_MONOTONIC); std::unique_lock lock{mSwapLock}; // mLastWallTime starts off at 0. If it is still 0, just update it to // the current time and avoid updating diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp index 219d04055eae..4c2f0ad102bd 100644 --- a/libs/hwui/hwui/Bitmap.cpp +++ b/libs/hwui/hwui/Bitmap.cpp @@ -17,17 +17,23 @@ #include "HardwareBitmapUploader.h" #include "Properties.h" +#ifdef __ANDROID__ // Layoutlib does not support render thread #include "renderthread/RenderProxy.h" +#endif #include "utils/Color.h" #include <utils/Trace.h> +#ifndef _WIN32 #include <sys/mman.h> +#endif #include <cutils/ashmem.h> #include <log/log.h> +#ifndef _WIN32 #include <binder/IServiceManager.h> #include <private/gui/ComposerService.h> +#endif #include <ui/PixelFormat.h> #include <SkCanvas.h> @@ -76,6 +82,7 @@ sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(SkBitmap* bitmap) { } sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(size_t size, const SkImageInfo& info, size_t rowBytes) { +#ifdef __ANDROID__ // Create new ashmem region with read/write priv int fd = ashmem_create_region("bitmap", size); if (fd < 0) { @@ -94,10 +101,17 @@ sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(size_t size, const SkImageInfo& info, return nullptr; } return sk_sp<Bitmap>(new Bitmap(addr, fd, size, info, rowBytes)); +#else + return Bitmap::allocateHeapBitmap(size, info, rowBytes); +#endif } sk_sp<Bitmap> Bitmap::allocateHardwareBitmap(const SkBitmap& bitmap) { +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration return uirenderer::HardwareBitmapUploader::allocateHardwareBitmap(bitmap); +#else + return Bitmap::allocateHeapBitmap(bitmap.info()); +#endif } sk_sp<Bitmap> Bitmap::allocateHeapBitmap(SkBitmap* bitmap) { @@ -133,6 +147,7 @@ sk_sp<Bitmap> Bitmap::createFrom(const SkImageInfo& info, SkPixelRef& pixelRef) } +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration sk_sp<Bitmap> Bitmap::createFrom(sp<GraphicBuffer> graphicBuffer, SkColorType colorType, sk_sp<SkColorSpace> colorSpace, SkAlphaType alphaType, BitmapPalette palette) { @@ -140,9 +155,13 @@ sk_sp<Bitmap> Bitmap::createFrom(sp<GraphicBuffer> graphicBuffer, SkColorType co colorType, alphaType, colorSpace); return sk_sp<Bitmap>(new Bitmap(graphicBuffer.get(), info, palette)); } +#endif sk_sp<Bitmap> Bitmap::createFrom(const SkImageInfo& info, size_t rowBytes, int fd, void* addr, size_t size, bool readOnly) { +#ifdef _WIN32 // ashmem not implemented on Windows + return nullptr; +#else if (info.colorType() == kUnknown_SkColorType) { LOG_ALWAYS_FATAL("unknown bitmap configuration"); return nullptr; @@ -163,6 +182,7 @@ sk_sp<Bitmap> Bitmap::createFrom(const SkImageInfo& info, size_t rowBytes, int f bitmap->setImmutable(); } return bitmap; +#endif } void Bitmap::setColorSpace(sk_sp<SkColorSpace> colorSpace) { @@ -217,6 +237,7 @@ Bitmap::Bitmap(void* address, int fd, size_t mappedSize, const SkImageInfo& info mPixelStorage.ashmem.size = mappedSize; } +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration Bitmap::Bitmap(GraphicBuffer* buffer, const SkImageInfo& info, BitmapPalette palette) : SkPixelRef(info.width(), info.height(), nullptr, bytesPerPixel(buffer->getPixelFormat()) * buffer->getStride()) @@ -230,6 +251,7 @@ Bitmap::Bitmap(GraphicBuffer* buffer, const SkImageInfo& info, BitmapPalette pal mImage = SkImage::MakeFromAHardwareBuffer(reinterpret_cast<AHardwareBuffer*>(buffer), mInfo.alphaType(), mInfo.refColorSpace()); } +#endif Bitmap::~Bitmap() { switch (mPixelStorageType) { @@ -238,17 +260,23 @@ Bitmap::~Bitmap() { mPixelStorage.external.context); break; case PixelStorageType::Ashmem: +#ifndef _WIN32 // ashmem not implemented on Windows munmap(mPixelStorage.ashmem.address, mPixelStorage.ashmem.size); +#endif close(mPixelStorage.ashmem.fd); break; case PixelStorageType::Heap: free(mPixelStorage.heap.address); +#ifdef __ANDROID__ mallopt(M_PURGE, 0); +#endif break; case PixelStorageType::Hardware: +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration auto buffer = mPixelStorage.hardware.buffer; buffer->decStrong(buffer); mPixelStorage.hardware.buffer = nullptr; +#endif break; } } @@ -307,11 +335,13 @@ void Bitmap::setAlphaType(SkAlphaType alphaType) { } void Bitmap::getSkBitmap(SkBitmap* outBitmap) { +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration if (isHardware()) { outBitmap->allocPixels(mInfo); uirenderer::renderthread::RenderProxy::copyHWBitmapInto(this, outBitmap); return; } +#endif outBitmap->setInfo(mInfo, rowBytes()); outBitmap->setPixelRef(sk_ref_sp(this), 0, 0); } @@ -321,12 +351,14 @@ void Bitmap::getBounds(SkRect* bounds) const { bounds->set(0, 0, SkIntToScalar(width()), SkIntToScalar(height())); } +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration GraphicBuffer* Bitmap::graphicBuffer() { if (isHardware()) { return mPixelStorage.hardware.buffer; } return nullptr; } +#endif sk_sp<SkImage> Bitmap::makeImage() { sk_sp<SkImage> image = mImage; diff --git a/libs/hwui/hwui/Bitmap.h b/libs/hwui/hwui/Bitmap.h index dd98b25ac7e8..c7e18d10de96 100644 --- a/libs/hwui/hwui/Bitmap.h +++ b/libs/hwui/hwui/Bitmap.h @@ -23,7 +23,9 @@ #include <SkImageInfo.h> #include <SkPixelRef.h> #include <cutils/compiler.h> +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration #include <ui/GraphicBuffer.h> +#endif namespace android { @@ -71,11 +73,13 @@ public: /* The createFrom factories construct a new Bitmap object by wrapping the already allocated * memory that is provided as an input param. */ +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration static sk_sp<Bitmap> createFrom(sp<GraphicBuffer> graphicBuffer, SkColorType colorType, sk_sp<SkColorSpace> colorSpace, SkAlphaType alphaType = kPremul_SkAlphaType, BitmapPalette palette = BitmapPalette::Unknown); +#endif static sk_sp<Bitmap> createFrom(const SkImageInfo& info, size_t rowBytes, int fd, void* addr, size_t size, bool readOnly); static sk_sp<Bitmap> createFrom(const SkImageInfo&, SkPixelRef&); @@ -105,7 +109,9 @@ public: PixelStorageType pixelStorageType() const { return mPixelStorageType; } +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration GraphicBuffer* graphicBuffer(); +#endif /** * Creates or returns a cached SkImage and is safe to be invoked from either @@ -136,7 +142,9 @@ private: Bitmap(void* address, void* context, FreeFunc freeFunc, const SkImageInfo& info, size_t rowBytes); Bitmap(void* address, int fd, size_t mappedSize, const SkImageInfo& info, size_t rowBytes); +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration Bitmap(GraphicBuffer* buffer, const SkImageInfo& info, BitmapPalette palette); +#endif virtual ~Bitmap(); void* getStorage() const; @@ -165,9 +173,11 @@ private: void* address; size_t size; } heap; +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration struct { GraphicBuffer* buffer; } hardware; +#endif } mPixelStorage; sk_sp<SkImage> mImage; // Cache is used only for HW Bitmaps with Skia pipeline. diff --git a/libs/hwui/hwui/Canvas.cpp b/libs/hwui/hwui/Canvas.cpp index 68aa7374fec4..a48c86028262 100644 --- a/libs/hwui/hwui/Canvas.cpp +++ b/libs/hwui/hwui/Canvas.cpp @@ -154,6 +154,11 @@ void Canvas::drawText(const uint16_t* text, int textSize, int start, int count, // minikin may modify the original paint Paint paint(origPaint); + // interpret 'linear metrics' flag as 'linear', forcing no-hinting when drawing + if (paint.getSkFont().isLinearMetrics()) { + paint.getSkFont().setHinting(SkFontHinting::kNone); + } + minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, textSize, start, count, contextStart, contextCount, mt); @@ -234,23 +239,30 @@ private: }; void Canvas::drawTextOnPath(const uint16_t* text, int count, minikin::Bidi bidiFlags, - const SkPath& path, float hOffset, float vOffset, const Paint& paint, - const Typeface* typeface) { - Paint paintCopy(paint); + const SkPath& path, float hOffset, float vOffset, + const Paint& origPaint, const Typeface* typeface) { + // minikin may modify the original paint + Paint paint(origPaint); + + // interpret 'linear metrics' flag as 'linear', forcing no-hinting when drawing + if (paint.getSkFont().isLinearMetrics()) { + paint.getSkFont().setHinting(SkFontHinting::kNone); + } + minikin::Layout layout = - MinikinUtils::doLayout(&paintCopy, bidiFlags, typeface, text, count, // text buffer - 0, count, // draw range - 0, count, // context range + MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, count, // text buffer + 0, count, // draw range + 0, count, // context range nullptr); - hOffset += MinikinUtils::hOffsetForTextAlign(&paintCopy, layout, path); + hOffset += MinikinUtils::hOffsetForTextAlign(&paint, layout, path); // Set align to left for drawing, as we don't want individual // glyphs centered or right-aligned; the offset above takes // care of all alignment. - paintCopy.setTextAlign(Paint::kLeft_Align); + paint.setTextAlign(Paint::kLeft_Align); - DrawTextOnPathFunctor f(layout, this, hOffset, vOffset, paintCopy, path); - MinikinUtils::forFontRun(layout, &paintCopy, f); + DrawTextOnPathFunctor f(layout, this, hOffset, vOffset, paint, path); + MinikinUtils::forFontRun(layout, &paint, f); } int Canvas::sApiLevel = 1; diff --git a/libs/hwui/hwui/Typeface.cpp b/libs/hwui/hwui/Typeface.cpp index c4d8aa6c8fad..ccc328c702db 100644 --- a/libs/hwui/hwui/Typeface.cpp +++ b/libs/hwui/hwui/Typeface.cpp @@ -18,7 +18,9 @@ #include <fcntl.h> // For tests. #include <pthread.h> +#ifndef _WIN32 #include <sys/mman.h> // For tests. +#endif #include <sys/stat.h> // For tests. #include "MinikinSkia.h" @@ -171,6 +173,7 @@ void Typeface::setDefault(const Typeface* face) { } void Typeface::setRobotoTypefaceForTest() { +#ifndef _WIN32 const char* kRobotoFont = "/system/fonts/Roboto-Regular.ttf"; int fd = open(kRobotoFont, O_RDONLY); @@ -198,5 +201,6 @@ void Typeface::setRobotoTypefaceForTest() { hwTypeface->fStyle = minikin::FontStyle(); Typeface::setDefault(hwTypeface); +#endif } } // namespace android diff --git a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp index 1bd30eb5371b..9c8463417e0a 100644 --- a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp +++ b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp @@ -18,7 +18,6 @@ #include <SkPaintFilterCanvas.h> #include "RenderNode.h" #include "SkiaDisplayList.h" -#include "SkiaPipeline.h" #include "utils/TraceUtils.h" #include <optional> @@ -187,17 +186,13 @@ public: AlphaFilterCanvas(SkCanvas* canvas, float alpha) : SkPaintFilterCanvas(canvas), mAlpha(alpha) {} protected: - bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type t) const override { - std::optional<SkPaint> defaultPaint; - if (!*paint) { - paint->init(defaultPaint.emplace()); - } - paint->writable()->setAlpha((uint8_t)(*paint)->getAlpha() * mAlpha); + bool onFilter(SkPaint& paint) const override { + paint.setAlpha((uint8_t)paint.getAlpha() * mAlpha); return true; } void onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix) override { // We unroll the drawable using "this" canvas, so that draw calls contained inside will - // get their alpha applied. THe default SkPaintFilterCanvas::onDrawDrawable does not unroll. + // get their alpha applied. The default SkPaintFilterCanvas::onDrawDrawable does not unroll. drawable->draw(this, matrix); } diff --git a/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp b/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp index 0a3c8f4347eb..3b8caeb3aab1 100644 --- a/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp +++ b/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp @@ -17,7 +17,7 @@ #include "ReorderBarrierDrawables.h" #include "RenderNode.h" #include "SkiaDisplayList.h" -#include "SkiaPipeline.h" +#include "LightingInfo.h" #include <SkPathOps.h> #include <SkShadowUtils.h> @@ -27,7 +27,7 @@ namespace uirenderer { namespace skiapipeline { StartReorderBarrierDrawable::StartReorderBarrierDrawable(SkiaDisplayList* data) - : mEndChildIndex(0), mBeginChildIndex(data->mChildNodes.size()), mDisplayList(data) {} + : mEndChildIndex(-1), mBeginChildIndex(data->mChildNodes.size()), mDisplayList(data) {} void StartReorderBarrierDrawable::onDraw(SkCanvas* canvas) { if (mChildren.empty()) { @@ -139,8 +139,8 @@ void EndReorderBarrierDrawable::drawShadow(SkCanvas* canvas, RenderNodeDrawable* return; } - float ambientAlpha = (SkiaPipeline::getAmbientShadowAlpha() / 255.f) * casterAlpha; - float spotAlpha = (SkiaPipeline::getSpotShadowAlpha() / 255.f) * casterAlpha; + float ambientAlpha = (LightingInfo::getAmbientShadowAlpha() / 255.f) * casterAlpha; + float spotAlpha = (LightingInfo::getSpotShadowAlpha() / 255.f) * casterAlpha; const RevealClip& revealClip = casterProperties.getRevealClip(); const SkPath* revealClipPath = revealClip.getPath(); @@ -192,7 +192,7 @@ void EndReorderBarrierDrawable::drawShadow(SkCanvas* canvas, RenderNodeDrawable* casterPath = &tmpPath; } - const Vector3 lightPos = SkiaPipeline::getLightCenter(); + const Vector3 lightPos = LightingInfo::getLightCenter(); SkPoint3 skiaLightPos = SkPoint3::Make(lightPos.x, lightPos.y, lightPos.z); SkPoint3 zParams; if (shadowMatrix.hasPerspective()) { @@ -206,7 +206,7 @@ void EndReorderBarrierDrawable::drawShadow(SkCanvas* canvas, RenderNodeDrawable* SkColor ambientColor = multiplyAlpha(casterProperties.getAmbientShadowColor(), ambientAlpha); SkColor spotColor = multiplyAlpha(casterProperties.getSpotShadowColor(), spotAlpha); SkShadowUtils::DrawShadow( - canvas, *casterPath, zParams, skiaLightPos, SkiaPipeline::getLightRadius(), + canvas, *casterPath, zParams, skiaLightPos, LightingInfo::getLightRadius(), ambientColor, spotColor, casterAlpha < 1.0f ? SkShadowFlags::kTransparentOccluder_ShadowFlag : 0); } diff --git a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp index 41bcfc25f5c1..c7d5f3193f45 100644 --- a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp +++ b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp @@ -17,9 +17,15 @@ #include "SkiaDisplayList.h" #include "DumpOpsCanvas.h" +#ifdef __ANDROID__ // Layoutlib does not support SkiaPipeline #include "SkiaPipeline.h" +#else +#include "DamageAccumulator.h" +#endif #include "VectorDrawable.h" +#ifdef __ANDROID__ #include "renderthread/CanvasContext.h" +#endif #include <SkImagePriv.h> #include <SkPathOps.h> @@ -81,6 +87,7 @@ bool SkiaDisplayList::prepareListAndChildren( // If the prepare tree is triggered by the UI thread and no previous call to // pinImages has failed then we must pin all mutable images in the GPU cache // until the next UI thread draw. +#ifdef __ANDROID__ // Layoutlib does not support CanvasContext if (info.prepareTextures && !info.canvasContext.pinImages(mMutableImages)) { // In the event that pinning failed we prevent future pinImage calls for the // remainder of this tree traversal and also unpin any currently pinned images @@ -88,6 +95,7 @@ bool SkiaDisplayList::prepareListAndChildren( info.prepareTextures = false; info.canvasContext.unpinImages(); } +#endif bool hasBackwardProjectedNodesHere = false; bool hasBackwardProjectedNodesSubtree = false; @@ -131,21 +139,22 @@ bool SkiaDisplayList::prepareListAndChildren( } } - for (auto& vectorDrawablePair : mVectorDrawables) { + for (auto& [vectorDrawable, cachedMatrix] : mVectorDrawables) { // If any vector drawable in the display list needs update, damage the node. - auto& vectorDrawable = vectorDrawablePair.first; if (vectorDrawable->isDirty()) { Matrix4 totalMatrix; info.damageAccumulator->computeCurrentTransform(&totalMatrix); - Matrix4 canvasMatrix(vectorDrawablePair.second); + Matrix4 canvasMatrix(cachedMatrix); totalMatrix.multiply(canvasMatrix); const SkRect& bounds = vectorDrawable->properties().getBounds(); if (intersects(info.screenSize, totalMatrix, bounds)) { isDirty = true; +#ifdef __ANDROID__ // Layoutlib does not support CanvasContext static_cast<SkiaPipeline*>(info.canvasContext.getRenderPipeline()) ->getVectorDrawables() ->push_back(vectorDrawable); vectorDrawable->setPropertyChangeWillBeConsumed(true); +#endif } } } diff --git a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp index 8092b1d10659..e7efe2ff798b 100644 --- a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp @@ -18,6 +18,7 @@ #include "DeferredLayerUpdater.h" #include "LayerDrawable.h" +#include "LightingInfo.h" #include "SkiaPipeline.h" #include "SkiaProfileRenderer.h" #include "hwui/Bitmap.h" @@ -99,7 +100,7 @@ bool SkiaOpenGLPipeline::draw(const Frame& frame, const SkRect& screenDirty, con mRenderThread.getGrContext(), backendRT, this->getSurfaceOrigin(), colorType, mSurfaceColorSpace, &props)); - SkiaPipeline::updateLighting(lightGeometry, lightInfo); + LightingInfo::updateLighting(lightGeometry, lightInfo); renderFrame(*layerUpdateQueue, dirty, renderNodes, opaque, contentDrawBounds, surface, SkMatrix::I()); layerUpdateQueue->clear(); diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp index 1f9ab5a242b4..84c0d1369e83 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp @@ -19,29 +19,29 @@ #include <SkImageEncoder.h> #include <SkImageInfo.h> #include <SkImagePriv.h> +#include <SkMultiPictureDocument.h> #include <SkOverdrawCanvas.h> #include <SkOverdrawColorFilter.h> #include <SkPicture.h> #include <SkPictureRecorder.h> +#include <SkSerialProcs.h> +#include "LightingInfo.h" #include "TreeInfo.h" #include "VectorDrawable.h" #include "thread/CommonPool.h" +#include "tools/SkSharingProc.h" #include "utils/TraceUtils.h" #include <unistd.h> +#include <android-base/properties.h> + using namespace android::uirenderer::renderthread; namespace android { namespace uirenderer { namespace skiapipeline { -float SkiaPipeline::mLightRadius = 0; -uint8_t SkiaPipeline::mAmbientShadowAlpha = 0; -uint8_t SkiaPipeline::mSpotShadowAlpha = 0; - -Vector3 SkiaPipeline::mLightCenter = {FLT_MIN, FLT_MIN, FLT_MIN}; - SkiaPipeline::SkiaPipeline(RenderThread& thread) : mRenderThread(thread) { mVectorDrawables.reserve(30); } @@ -82,7 +82,7 @@ void SkiaPipeline::onPrepareTree() { void SkiaPipeline::renderLayers(const LightGeometry& lightGeometry, LayerUpdateQueue* layerUpdateQueue, bool opaque, const LightInfo& lightInfo) { - updateLighting(lightGeometry, lightInfo); + LightingInfo::updateLighting(lightGeometry, lightInfo); ATRACE_NAME("draw layers"); renderVectorDrawableCache(); renderLayersImpl(*layerUpdateQueue, opaque); @@ -102,7 +102,7 @@ void SkiaPipeline::renderLayersImpl(const LayerUpdateQueue& layers, bool opaque) SkASSERT(layerNode->getLayerSurface()); SkiaDisplayList* displayList = (SkiaDisplayList*)layerNode->getDisplayList(); if (!displayList || displayList->isEmpty()) { - SkDEBUGF(("%p drawLayers(%s) : missing drawable", layerNode, layerNode->getName())); + ALOGE("%p drawLayers(%s) : missing drawable", layerNode, layerNode->getName()); return; } @@ -115,9 +115,13 @@ void SkiaPipeline::renderLayersImpl(const LayerUpdateQueue& layers, bool opaque) layerCanvas->androidFramework_setDeviceClipRestriction(layerDamage.toSkIRect()); - auto savedLightCenter = mLightCenter; + // TODO: put localized light center calculation and storage to a drawable related code. + // It does not seem right to store something localized in a global state + const Vector3 savedLightCenter(LightingInfo::getLightCenterRaw()); + Vector3 transformedLightCenter(savedLightCenter); // map current light center into RenderNode's coordinate space - layerNode->getSkiaLayer()->inverseTransformInWindow.mapPoint3d(mLightCenter); + layerNode->getSkiaLayer()->inverseTransformInWindow.mapPoint3d(transformedLightCenter); + LightingInfo::setLightCenterRaw(transformedLightCenter); const RenderProperties& properties = layerNode->properties(); const SkRect bounds = SkRect::MakeWH(properties.getWidth(), properties.getHeight()); @@ -134,7 +138,7 @@ void SkiaPipeline::renderLayersImpl(const LayerUpdateQueue& layers, bool opaque) RenderNodeDrawable root(layerNode, layerCanvas, false); root.forceDraw(layerCanvas); layerCanvas->restoreToCount(saveCount); - mLightCenter = savedLightCenter; + LightingInfo::setLightCenterRaw(savedLightCenter); // cache the current context so that we can defer flushing it until // either all the layers have been rendered or the context changes @@ -232,59 +236,138 @@ static void savePictureAsync(const sk_sp<SkData>& data, const std::string& filen if (stream.isValid()) { stream.write(data->data(), data->size()); stream.flush(); - SkDebugf("SKP Captured Drawing Output (%d bytes) for frame. %s", stream.bytesWritten(), + ALOGD("SKP Captured Drawing Output (%zu bytes) for frame. %s", stream.bytesWritten(), filename.c_str()); } }); } -SkCanvas* SkiaPipeline::tryCapture(SkSurface* surface) { - if (CC_UNLIKELY(Properties::skpCaptureEnabled)) { - char prop[PROPERTY_VALUE_MAX] = {'\0'}; +// Note multiple SkiaPipeline instances may be loaded if more than one app is visible. +// Each instance may observe the filename changing and try to record to a file of the same name. +// Only the first one will succeed. There is no scope available here where we could coordinate +// to cause this function to return true for only one of the instances. +bool SkiaPipeline::shouldStartNewFileCapture() { + // Don't start a new file based capture if one is currently ongoing. + if (mCaptureMode != CaptureMode::None) { return false; } + + // A new capture is started when the filename property changes. + // Read the filename property. + std::string prop = base::GetProperty(PROPERTY_CAPTURE_SKP_FILENAME, "0"); + // if the filename property changed to a valid value + if (prop[0] != '0' && mCapturedFile != prop) { + // remember this new filename + mCapturedFile = prop; + // and get a property indicating how many frames to capture. + mCaptureSequence = base::GetIntProperty(PROPERTY_CAPTURE_SKP_FRAMES, 1); if (mCaptureSequence <= 0) { - property_get(PROPERTY_CAPTURE_SKP_FILENAME, prop, "0"); - if (prop[0] != '0' && mCapturedFile != prop) { - mCapturedFile = prop; - mCaptureSequence = property_get_int32(PROPERTY_CAPTURE_SKP_FRAMES, 1); - } + return false; + } else if (mCaptureSequence == 1) { + mCaptureMode = CaptureMode::SingleFrameSKP; + } else { + mCaptureMode = CaptureMode::MultiFrameSKP; } - if (mCaptureSequence > 0 || mPictureCapturedCallback) { - mRecorder.reset(new SkPictureRecorder()); - SkCanvas* pictureCanvas = - mRecorder->beginRecording(surface->width(), surface->height(), nullptr, - SkPictureRecorder::kPlaybackDrawPicture_RecordFlag); - mNwayCanvas = std::make_unique<SkNWayCanvas>(surface->width(), surface->height()); - mNwayCanvas->addCanvas(surface->getCanvas()); - mNwayCanvas->addCanvas(pictureCanvas); - return mNwayCanvas.get(); + return true; + } + return false; +} + +// performs the first-frame work of a multi frame SKP capture. Returns true if successful. +bool SkiaPipeline::setupMultiFrameCapture() { + ALOGD("Set up multi-frame capture, frames = %d", mCaptureSequence); + // We own this stream and need to hold it until close() finishes. + auto stream = std::make_unique<SkFILEWStream>(mCapturedFile.c_str()); + if (stream->isValid()) { + mOpenMultiPicStream = std::move(stream); + mSerialContext.reset(new SkSharingSerialContext()); + SkSerialProcs procs; + procs.fImageProc = SkSharingSerialContext::serializeImage; + procs.fImageCtx = mSerialContext.get(); + // SkDocuments don't take owership of the streams they write. + // we need to keep it until after mMultiPic.close() + // procs is passed as a pointer, but just as a method of having an optional default. + // procs doesn't need to outlive this Make call. + mMultiPic = SkMakeMultiPictureDocument(mOpenMultiPicStream.get(), &procs); + return true; + } else { + ALOGE("Could not open \"%s\" for writing.", mCapturedFile.c_str()); + mCaptureSequence = 0; + mCaptureMode = CaptureMode::None; + return false; + } +} + +SkCanvas* SkiaPipeline::tryCapture(SkSurface* surface) { + if (CC_LIKELY(!Properties::skpCaptureEnabled)) { + return surface->getCanvas(); // Bail out early when capture is not turned on. + } + // Note that shouldStartNewFileCapture tells us if this is the *first* frame of a capture. + if (shouldStartNewFileCapture() && mCaptureMode == CaptureMode::MultiFrameSKP) { + if (!setupMultiFrameCapture()) { + return surface->getCanvas(); } } - return surface->getCanvas(); + + // Create a canvas pointer, fill it depending on what kind of capture is requested (if any) + SkCanvas* pictureCanvas = nullptr; + switch (mCaptureMode) { + case CaptureMode::CallbackAPI: + case CaptureMode::SingleFrameSKP: + mRecorder.reset(new SkPictureRecorder()); + pictureCanvas = mRecorder->beginRecording(surface->width(), surface->height(), + nullptr, SkPictureRecorder::kPlaybackDrawPicture_RecordFlag); + break; + case CaptureMode::MultiFrameSKP: + // If a multi frame recording is active, initialize recording for a single frame of a + // multi frame file. + pictureCanvas = mMultiPic->beginPage(surface->width(), surface->height()); + break; + case CaptureMode::None: + // Returning here in the non-capture case means we can count on pictureCanvas being + // non-null below. + return surface->getCanvas(); + } + + // Setting up an nway canvas is common to any kind of capture. + mNwayCanvas = std::make_unique<SkNWayCanvas>(surface->width(), surface->height()); + mNwayCanvas->addCanvas(surface->getCanvas()); + mNwayCanvas->addCanvas(pictureCanvas); + return mNwayCanvas.get(); } void SkiaPipeline::endCapture(SkSurface* surface) { + if (CC_LIKELY(mCaptureMode == CaptureMode::None)) { return; } mNwayCanvas.reset(); - if (CC_UNLIKELY(mRecorder.get())) { - ATRACE_CALL(); + ATRACE_CALL(); + if (mCaptureSequence > 0 && mCaptureMode == CaptureMode::MultiFrameSKP) { + mMultiPic->endPage(); + mCaptureSequence--; + if (mCaptureSequence == 0) { + mCaptureMode = CaptureMode::None; + // Pass mMultiPic and mOpenMultiPicStream to a background thread, which will handle + // the heavyweight serialization work and destroy them. mOpenMultiPicStream is released + // to a bare pointer because keeping it in a smart pointer makes the lambda + // non-copyable. The lambda is only called once, so this is safe. + SkFILEWStream* stream = mOpenMultiPicStream.release(); + CommonPool::post([doc = std::move(mMultiPic), stream]{ + ALOGD("Finalizing multi frame SKP"); + doc->close(); + delete stream; + ALOGD("Multi frame SKP complete."); + }); + } + } else { sk_sp<SkPicture> picture = mRecorder->finishRecordingAsPicture(); if (picture->approximateOpCount() > 0) { - if (mCaptureSequence > 0) { - ATRACE_BEGIN("picture->serialize"); - auto data = picture->serialize(); - ATRACE_END(); - - // offload saving to file in a different thread - if (1 == mCaptureSequence) { - savePictureAsync(data, mCapturedFile); - } else { - savePictureAsync(data, mCapturedFile + "_" + std::to_string(mCaptureSequence)); - } - mCaptureSequence--; - } if (mPictureCapturedCallback) { std::invoke(mPictureCapturedCallback, std::move(picture)); + } else { + // single frame skp to file + auto data = picture->serialize(); + savePictureAsync(data, mCapturedFile); + mCaptureSequence = 0; } } + mCaptureMode = CaptureMode::None; mRecorder.reset(); } } @@ -305,7 +388,6 @@ void SkiaPipeline::renderFrame(const LayerUpdateQueue& layers, const SkRect& cli // initialize the canvas for the current frame, that might be a recording canvas if SKP // capture is enabled. - std::unique_ptr<SkPictureRecorder> recorder; SkCanvas* canvas = tryCapture(surface.get()); renderFrameImpl(layers, clip, nodes, opaque, contentDrawBounds, canvas, preTransform); diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.h b/libs/hwui/pipeline/skia/SkiaPipeline.h index 41d864653b67..37b559f92f05 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.h +++ b/libs/hwui/pipeline/skia/SkiaPipeline.h @@ -17,12 +17,15 @@ #pragma once #include <SkSurface.h> +#include <SkDocument.h> +#include <SkMultiPictureDocument.h> #include "Lighting.h" #include "hwui/AnimatedImageDrawable.h" #include "renderthread/CanvasContext.h" #include "renderthread/IRenderPipeline.h" class SkPictureRecorder; +struct SkSharingSerialContext; namespace android { namespace uirenderer { @@ -60,52 +63,12 @@ public: void renderLayersImpl(const LayerUpdateQueue& layers, bool opaque); - static float getLightRadius() { - if (CC_UNLIKELY(Properties::overrideLightRadius > 0)) { - return Properties::overrideLightRadius; - } - return mLightRadius; - } - - static uint8_t getAmbientShadowAlpha() { - if (CC_UNLIKELY(Properties::overrideAmbientShadowStrength >= 0)) { - return Properties::overrideAmbientShadowStrength; - } - return mAmbientShadowAlpha; - } - - static uint8_t getSpotShadowAlpha() { - if (CC_UNLIKELY(Properties::overrideSpotShadowStrength >= 0)) { - return Properties::overrideSpotShadowStrength; - } - return mSpotShadowAlpha; - } - - static Vector3 getLightCenter() { - if (CC_UNLIKELY(Properties::overrideLightPosY > 0 || Properties::overrideLightPosZ > 0)) { - Vector3 adjustedLightCenter = mLightCenter; - if (CC_UNLIKELY(Properties::overrideLightPosY > 0)) { - // negated since this shifts up - adjustedLightCenter.y = -Properties::overrideLightPosY; - } - if (CC_UNLIKELY(Properties::overrideLightPosZ > 0)) { - adjustedLightCenter.z = Properties::overrideLightPosZ; - } - return adjustedLightCenter; - } - return mLightCenter; - } - - static void updateLighting(const LightGeometry& lightGeometry, const LightInfo& lightInfo) { - mLightRadius = lightGeometry.radius; - mAmbientShadowAlpha = lightInfo.ambientShadowAlpha; - mSpotShadowAlpha = lightInfo.spotShadowAlpha; - mLightCenter = lightGeometry.center; - } - + // Sets the recording callback to the provided function and the recording mode + // to CallbackAPI void setPictureCapturedCallback( const std::function<void(sk_sp<SkPicture>&&)>& callback) override { mPictureCapturedCallback = callback; + mCaptureMode = callback ? CaptureMode::CallbackAPI : CaptureMode::None; } protected: @@ -135,8 +98,18 @@ private: */ void renderVectorDrawableCache(); + // Called every frame. Normally returns early with screen canvas. + // But when capture is enabled, returns an nwaycanvas where commands are also recorded. SkCanvas* tryCapture(SkSurface* surface); + // Called at the end of every frame, closes the recording if necessary. void endCapture(SkSurface* surface); + // Determine if a new file-based capture should be started. + // If so, sets mCapturedFile and mCaptureSequence and returns true. + // Should be called every frame when capture is enabled. + // sets mCaptureMode. + bool shouldStartNewFileCapture(); + // Set up a multi frame capture. + bool setupMultiFrameCapture(); std::vector<sk_sp<SkImage>> mPinnedImages; @@ -146,28 +119,47 @@ private: std::vector<VectorDrawableRoot*> mVectorDrawables; // Block of properties used only for debugging to record a SkPicture and save it in a file. + // There are three possible ways of recording drawing commands. + enum class CaptureMode { + // return to this mode when capture stops. + None, + // A mode where every frame is recorded into an SkPicture and sent to a provided callback, + // until that callback is cleared + CallbackAPI, + // A mode where a finite number of frames are recorded to a file with + // SkMultiPictureDocument + MultiFrameSKP, + // A mode which records a single frame to a normal SKP file. + SingleFrameSKP, + }; + CaptureMode mCaptureMode = CaptureMode::None; + /** - * mCapturedFile is used to enforce we don't capture more than once for a given name (cause - * permissions don't allow to reset a property from render thread). + * mCapturedFile - the filename to write a recorded SKP to in either MultiFrameSKP or + * SingleFrameSKP mode. */ std::string mCapturedFile; /** - * mCaptureSequence counts how many frames are left to take in the sequence. + * mCaptureSequence counts down how many frames are left to take in the sequence. Applicable + * only to MultiFrameSKP or SingleFrameSKP mode. */ int mCaptureSequence = 0; + // Multi frame serialization stream and writer used when serializing more than one frame. + std::unique_ptr<SkFILEWStream> mOpenMultiPicStream; + sk_sp<SkDocument> mMultiPic; + std::unique_ptr<SkSharingSerialContext> mSerialContext; + /** - * mRecorder holds the current picture recorder. We could store it on the stack to support - * parallel tryCapture calls (not really needed). + * mRecorder holds the current picture recorder when serializing in either SingleFrameSKP or + * CallbackAPI modes. */ std::unique_ptr<SkPictureRecorder> mRecorder; std::unique_ptr<SkNWayCanvas> mNwayCanvas; - std::function<void(sk_sp<SkPicture>&&)> mPictureCapturedCallback; - static float mLightRadius; - static uint8_t mAmbientShadowAlpha; - static uint8_t mSpotShadowAlpha; - static Vector3 mLightCenter; + // Set by setPictureCapturedCallback and when set, CallbackAPI mode recording is ongoing. + // Not used in other recording modes. + std::function<void(sk_sp<SkPicture>&&)> mPictureCapturedCallback; }; } /* namespace skiapipeline */ diff --git a/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp b/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp index 16c8b8923074..38ef131bedef 100644 --- a/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp +++ b/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp @@ -18,14 +18,18 @@ #include <SkImagePriv.h> #include "CanvasTransform.h" +#ifdef __ANDROID__ // Layoutlib does not support Layers #include "Layer.h" #include "LayerDrawable.h" +#endif #include "NinePatchUtils.h" #include "RenderNode.h" #include "pipeline/skia/AnimatedDrawables.h" +#ifdef __ANDROID__ // Layoutlib does not support GL, Vulcan etc. #include "pipeline/skia/GLFunctorDrawable.h" #include "pipeline/skia/VkFunctorDrawable.h" #include "pipeline/skia/VkInteropFunctorDrawable.h" +#endif namespace android { namespace uirenderer { @@ -102,13 +106,16 @@ void SkiaRecordingCanvas::insertReorderBarrier(bool enableReorder) { } void SkiaRecordingCanvas::drawLayer(uirenderer::DeferredLayerUpdater* layerUpdater) { +#ifdef __ANDROID__ // Layoutlib does not support Layers if (layerUpdater != nullptr) { // Create a ref-counted drawable, which is kept alive by sk_sp in SkLiteDL. sk_sp<SkDrawable> drawable(new LayerDrawable(layerUpdater)); drawDrawable(drawable.get()); } +#endif } + void SkiaRecordingCanvas::drawRenderNode(uirenderer::RenderNode* renderNode) { // Record the child node. Drawable dtor will be invoked when mChildNodes deque is cleared. mDisplayList->mChildNodes.emplace_back(renderNode, asSkCanvas(), true, mCurrentBarrier); @@ -125,8 +132,10 @@ void SkiaRecordingCanvas::drawRenderNode(uirenderer::RenderNode* renderNode) { } } + void SkiaRecordingCanvas::callDrawGLFunction(Functor* functor, uirenderer::GlFunctorLifecycleListener* listener) { +#ifdef __ANDROID__ // Layoutlib does not support GL, Vulcan etc. FunctorDrawable* functorDrawable; if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaVulkan) { functorDrawable = mDisplayList->allocateDrawable<VkInteropFunctorDrawable>( @@ -137,9 +146,11 @@ void SkiaRecordingCanvas::callDrawGLFunction(Functor* functor, } mDisplayList->mChildFunctors.push_back(functorDrawable); drawDrawable(functorDrawable); +#endif } void SkiaRecordingCanvas::drawWebViewFunctor(int functor) { +#ifdef __ANDROID__ // Layoutlib does not support GL, Vulcan etc. FunctorDrawable* functorDrawable; if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaVulkan) { functorDrawable = mDisplayList->allocateDrawable<VkFunctorDrawable>(functor, asSkCanvas()); @@ -148,6 +159,7 @@ void SkiaRecordingCanvas::drawWebViewFunctor(int functor) { } mDisplayList->mChildFunctors.push_back(functorDrawable); drawDrawable(functorDrawable); +#endif } void SkiaRecordingCanvas::drawVectorDrawable(VectorDrawableRoot* tree) { diff --git a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp index e8cb219db320..ad7c70614239 100644 --- a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp @@ -19,6 +19,7 @@ #include "DeferredLayerUpdater.h" #include "Readback.h" #include "ShaderCache.h" +#include "LightingInfo.h" #include "SkiaPipeline.h" #include "SkiaProfileRenderer.h" #include "VkInteropFunctorDrawable.h" @@ -69,7 +70,7 @@ bool SkiaVulkanPipeline::draw(const Frame& frame, const SkRect& screenDirty, con if (backBuffer.get() == nullptr) { return false; } - SkiaPipeline::updateLighting(lightGeometry, lightInfo); + LightingInfo::updateLighting(lightGeometry, lightInfo); renderFrame(*layerUpdateQueue, dirty, renderNodes, opaque, contentDrawBounds, backBuffer, mVkSurface->getCurrentPreTransform()); ShaderCache::get().onVkFrameFlushed(mRenderThread.getGrContext()); diff --git a/libs/hwui/renderthread/CacheManager.h b/libs/hwui/renderthread/CacheManager.h index 9a5a00fcf762..ad251f2364fe 100644 --- a/libs/hwui/renderthread/CacheManager.h +++ b/libs/hwui/renderthread/CacheManager.h @@ -17,7 +17,9 @@ #ifndef CACHEMANAGER_H #define CACHEMANAGER_H +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration #include <GrContext.h> +#endif #include <SkSurface.h> #include <ui/DisplayInfo.h> #include <utils/String8.h> @@ -42,7 +44,9 @@ class CacheManager { public: enum class TrimMemoryMode { Complete, UiHidden }; +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration void configureContext(GrContextOptions* context, const void* identity, ssize_t size); +#endif void trimMemory(TrimMemoryMode mode); void trimStaleResources(); void dumpMemoryUsage(String8& log, const RenderState* renderState = nullptr); @@ -57,11 +61,15 @@ private: explicit CacheManager(const DisplayInfo& display); +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration void reset(sk_sp<GrContext> grContext); +#endif void destroy(); const size_t mMaxSurfaceArea; +#ifdef __ANDROID__ // Layoutlib does not support hardware acceleration sk_sp<GrContext> mGrContext; +#endif int mMaxResources = 0; const size_t mMaxResourceBytes; diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index f326ce8d23e9..550c27d7a051 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -19,7 +19,6 @@ #include "../Properties.h" #include "AnimationContext.h" -#include "EglManager.h" #include "Frame.h" #include "LayerUpdateQueue.h" #include "Properties.h" @@ -33,8 +32,6 @@ #include "utils/TimeUtils.h" #include "utils/TraceUtils.h" -#include <cutils/properties.h> -#include <private/hwui/DrawGlInfo.h> #include <strings.h> #include <fcntl.h> @@ -463,7 +460,7 @@ void CanvasContext::draw() { } SwapHistory& swap = mSwapHistory.next(); swap.damage = windowDirty; - swap.swapCompletedTime = systemTime(CLOCK_MONOTONIC); + swap.swapCompletedTime = systemTime(SYSTEM_TIME_MONOTONIC); swap.vsyncTime = mRenderThread.timeLord().latestVsync(); if (mNativeSurface.get()) { int durationUs; @@ -549,7 +546,7 @@ void CanvasContext::prepareAndDraw(RenderNode* node) { UiFrameInfoBuilder(frameInfo).addFlag(FrameInfoFlags::RTAnimation).setVsync(vsync, vsync); TreeInfo info(TreeInfo::MODE_RT_ONLY, *this); - prepareTree(info, frameInfo, systemTime(CLOCK_MONOTONIC), node); + prepareTree(info, frameInfo, systemTime(SYSTEM_TIME_MONOTONIC), node); if (info.out.canDrawThisFrame) { draw(); } else { diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index 982c087b031a..0910828da4f8 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -29,7 +29,6 @@ #include "renderthread/RenderTask.h" #include "renderthread/RenderThread.h" -#include <EGL/egl.h> #include <SkBitmap.h> #include <SkRect.h> #include <SkSize.h> @@ -55,7 +54,6 @@ class RenderState; namespace renderthread { -class EglManager; class Frame; // This per-renderer class manages the bridge between the global EGL context @@ -216,8 +214,9 @@ private: SkRect computeDirtyRect(const Frame& frame, SkRect* dirty); - EGLint mLastFrameWidth = 0; - EGLint mLastFrameHeight = 0; + // The same type as Frame.mWidth and Frame.mHeight + int32_t mLastFrameWidth = 0; + int32_t mLastFrameHeight = 0; RenderThread& mRenderThread; sp<ReliableSurface> mNativeSurface; diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index 91dc3bc6e603..1e593388d063 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -69,7 +69,7 @@ int DrawFrameTask::drawFrame() { LOG_ALWAYS_FATAL_IF(!mContext, "Cannot drawFrame with no CanvasContext!"); mSyncResult = SyncResult::OK; - mSyncQueued = systemTime(CLOCK_MONOTONIC); + mSyncQueued = systemTime(SYSTEM_TIME_MONOTONIC); postAndWait(); return mSyncResult; diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 1a1b9dac37f6..e50428b2ee62 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -22,19 +22,14 @@ #include "Readback.h" #include "Rect.h" #include "WebViewFunctorManager.h" -#include "pipeline/skia/SkiaOpenGLPipeline.h" #include "pipeline/skia/VectorDrawableAtlas.h" -#include "renderstate/RenderState.h" #include "renderthread/CanvasContext.h" -#include "renderthread/EglManager.h" #include "renderthread/RenderTask.h" #include "renderthread/RenderThread.h" #include "utils/Macros.h" #include "utils/TimeUtils.h" #include "utils/TraceUtils.h" -#include <ui/GraphicBuffer.h> - namespace android { namespace uirenderer { namespace renderthread { @@ -339,7 +334,7 @@ void RenderProxy::prepareToDraw(Bitmap& bitmap) { }; nsecs_t lastVsync = renderThread->timeLord().latestVsync(); nsecs_t estimatedNextVsync = lastVsync + renderThread->timeLord().frameIntervalNanos(); - nsecs_t timeToNextVsync = estimatedNextVsync - systemTime(CLOCK_MONOTONIC); + nsecs_t timeToNextVsync = estimatedNextVsync - systemTime(SYSTEM_TIME_MONOTONIC); // We expect the UI thread to take 4ms and for RT to be active from VSYNC+4ms to // VSYNC+12ms or so, so aim for the gap during which RT is expected to // be idle diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 71c5b53f727a..ee1a7ce19e82 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -31,10 +31,6 @@ #include "utils/TimeUtils.h" #include "utils/TraceUtils.h" -#ifdef HWUI_GLES_WRAP_ENABLED -#include "debug/GlesDriver.h" -#endif - #include <GrContextOptions.h> #include <gl/GrGLInterface.h> @@ -107,7 +103,7 @@ public: [this]() { mRenderThread->drainDisplayEventQueue(); }); } - virtual nsecs_t latestVsyncEvent() override { return systemTime(CLOCK_MONOTONIC); } + virtual nsecs_t latestVsyncEvent() override { return systemTime(SYSTEM_TIME_MONOTONIC); } private: RenderThread* mRenderThread; @@ -199,12 +195,7 @@ void RenderThread::requireGlContext() { } mEglManager->initialize(); -#ifdef HWUI_GLES_WRAP_ENABLED - debug::GlesDriver* driver = debug::GlesDriver::get(); - sk_sp<const GrGLInterface> glInterface(driver->getSkiaInterface()); -#else sk_sp<const GrGLInterface> glInterface(GrGLCreateNativeInterface()); -#endif LOG_ALWAYS_FATAL_IF(!glInterface.get()); GrContextOptions options; diff --git a/libs/hwui/renderthread/TimeLord.cpp b/libs/hwui/renderthread/TimeLord.cpp index b82c5d159756..784068f1d877 100644 --- a/libs/hwui/renderthread/TimeLord.cpp +++ b/libs/hwui/renderthread/TimeLord.cpp @@ -31,7 +31,7 @@ bool TimeLord::vsyncReceived(nsecs_t vsync) { nsecs_t TimeLord::computeFrameTimeNanos() { // Logic copied from Choreographer.java - nsecs_t now = systemTime(CLOCK_MONOTONIC); + nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); nsecs_t jitterNanos = now - mFrameTimeNanos; if (jitterNanos >= mFrameIntervalNanos) { nsecs_t lastFrameOffset = jitterNanos % mFrameIntervalNanos; diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp index 5173f638068d..280f7d3489d2 100644 --- a/libs/hwui/renderthread/VulkanManager.cpp +++ b/libs/hwui/renderthread/VulkanManager.cpp @@ -145,12 +145,6 @@ void VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFe GET_INST_PROC(GetPhysicalDeviceImageFormatProperties2); GET_INST_PROC(CreateDevice); GET_INST_PROC(EnumerateDeviceExtensionProperties); - GET_INST_PROC(CreateAndroidSurfaceKHR); - GET_INST_PROC(DestroySurfaceKHR); - GET_INST_PROC(GetPhysicalDeviceSurfaceSupportKHR); - GET_INST_PROC(GetPhysicalDeviceSurfaceCapabilitiesKHR); - GET_INST_PROC(GetPhysicalDeviceSurfaceFormatsKHR); - GET_INST_PROC(GetPhysicalDeviceSurfacePresentModesKHR); uint32_t gpuCount; LOG_ALWAYS_FATAL_IF(mEnumeratePhysicalDevices(mInstance, &gpuCount, nullptr)); @@ -480,6 +474,13 @@ struct DestroySemaphoreInfo { PFN_vkDestroySemaphore mDestroyFunction; VkDevice mDevice; VkSemaphore mSemaphore; + // We need to make sure we don't delete the VkSemaphore until it is done being used by both Skia + // (including by the GPU) and inside the VulkanManager. So we always start with two refs, one + // owned by Skia and one owned by the VulkanManager. The refs are decremented each time + // destroy_semaphore is called with this object. Skia will call destroy_semaphore once it is + // done with the semaphore and the GPU has finished work on the semaphore. The VulkanManager + // calls destroy_semaphore after sending the semaphore to Skia and exporting it if need be. + int mRefs = 2; DestroySemaphoreInfo(PFN_vkDestroySemaphore destroyFunction, VkDevice device, VkSemaphore semaphore) @@ -488,8 +489,11 @@ struct DestroySemaphoreInfo { static void destroy_semaphore(void* context) { DestroySemaphoreInfo* info = reinterpret_cast<DestroySemaphoreInfo*>(context); - info->mDestroyFunction(info->mDevice, info->mSemaphore, nullptr); - delete info; + --info->mRefs; + if (!info->mRefs) { + info->mDestroyFunction(info->mDevice, info->mSemaphore, nullptr); + delete info; + } } void VulkanManager::swapBuffers(VulkanSurface* surface, const SkRect& dirtyRect) { @@ -540,6 +544,7 @@ void VulkanManager::swapBuffers(VulkanSurface* surface, const SkRect& dirtyRect) ALOGE("VulkanManager::swapBuffers(): Semaphore submission failed"); mQueueWaitIdle(mGraphicsQueue); } + destroy_semaphore(destroyInfo); surface->presentCurrentBuffer(dirtyRect, fenceFd); } @@ -642,13 +647,16 @@ status_t VulkanManager::createReleaseFence(sp<Fence>& nativeFence, GrContext* gr DestroySemaphoreInfo* destroyInfo = new DestroySemaphoreInfo(mDestroySemaphore, mDevice, semaphore); + // Even if Skia fails to submit the semaphore, it will still call the destroy_semaphore callback + // which will remove its ref to the semaphore. The VulkanManager must still release its ref, + // when it is done with the semaphore. GrSemaphoresSubmitted submitted = grContext->flush(kNone_GrFlushFlags, 1, &backendSemaphore, destroy_semaphore, destroyInfo); if (submitted == GrSemaphoresSubmitted::kNo) { ALOGE("VulkanManager::createReleaseFence: Failed to submit semaphore"); - mDestroySemaphore(mDevice, semaphore, nullptr); + destroy_semaphore(destroyInfo); return INVALID_OPERATION; } @@ -661,6 +669,7 @@ status_t VulkanManager::createReleaseFence(sp<Fence>& nativeFence, GrContext* gr int fenceFd = 0; err = mGetSemaphoreFdKHR(mDevice, &getFdInfo, &fenceFd); + destroy_semaphore(destroyInfo); if (VK_SUCCESS != err) { ALOGE("VulkanManager::createReleaseFence: Failed to get semaphore Fd"); return INVALID_OPERATION; diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h index dd3c6d0dba81..ec217c0fcbf4 100644 --- a/libs/hwui/renderthread/VulkanManager.h +++ b/libs/hwui/renderthread/VulkanManager.h @@ -107,14 +107,6 @@ private: FNPTR_TYPE fPtr; }; - // WSI interface functions - VkPtr<PFN_vkCreateAndroidSurfaceKHR> mCreateAndroidSurfaceKHR; - VkPtr<PFN_vkDestroySurfaceKHR> mDestroySurfaceKHR; - VkPtr<PFN_vkGetPhysicalDeviceSurfaceSupportKHR> mGetPhysicalDeviceSurfaceSupportKHR; - VkPtr<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR> mGetPhysicalDeviceSurfaceCapabilitiesKHR; - VkPtr<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR> mGetPhysicalDeviceSurfaceFormatsKHR; - VkPtr<PFN_vkGetPhysicalDeviceSurfacePresentModesKHR> mGetPhysicalDeviceSurfacePresentModesKHR; - // Instance Functions VkPtr<PFN_vkEnumerateInstanceVersion> mEnumerateInstanceVersion; VkPtr<PFN_vkEnumerateInstanceExtensionProperties> mEnumerateInstanceExtensionProperties; diff --git a/libs/hwui/renderthread/VulkanSurface.cpp b/libs/hwui/renderthread/VulkanSurface.cpp index b2cc23e76b8a..bbffb359aebe 100644 --- a/libs/hwui/renderthread/VulkanSurface.cpp +++ b/libs/hwui/renderthread/VulkanSurface.cpp @@ -27,15 +27,6 @@ namespace android { namespace uirenderer { namespace renderthread { -static bool IsTransformSupported(int transform) { - // For now, only support pure rotations, not flip or flip-and-rotate, until we have - // more time to test them and build sample code. As far as I know we never actually - // use anything besides pure rotations anyway. - return transform == 0 || transform == NATIVE_WINDOW_TRANSFORM_ROT_90 || - transform == NATIVE_WINDOW_TRANSFORM_ROT_180 || - transform == NATIVE_WINDOW_TRANSFORM_ROT_270; -} - static int InvertTransform(int transform) { switch (transform) { case NATIVE_WINDOW_TRANSFORM_ROT_90: @@ -49,21 +40,6 @@ static int InvertTransform(int transform) { } } -static int ConvertVkTransformToNative(VkSurfaceTransformFlagsKHR transform) { - switch (transform) { - case VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR: - return NATIVE_WINDOW_TRANSFORM_ROT_270; - case VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR: - return NATIVE_WINDOW_TRANSFORM_ROT_180; - case VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR: - return NATIVE_WINDOW_TRANSFORM_ROT_90; - case VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR: - case VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR: - default: - return 0; - } -} - static SkMatrix GetPreTransformMatrix(SkISize windowSize, int transform) { const int width = windowSize.width(); const int height = windowSize.height(); @@ -83,180 +59,157 @@ static SkMatrix GetPreTransformMatrix(SkISize windowSize, int transform) { return SkMatrix::I(); } -void VulkanSurface::ComputeWindowSizeAndTransform(WindowInfo* windowInfo, const SkISize& minSize, - const SkISize& maxSize) { - SkISize& windowSize = windowInfo->size; - - // clamp width & height to handle currentExtent of -1 and protect us from broken hints - if (windowSize.width() < minSize.width() || windowSize.width() > maxSize.width() || - windowSize.height() < minSize.height() || windowSize.height() > maxSize.height()) { - int width = std::min(maxSize.width(), std::max(minSize.width(), windowSize.width())); - int height = std::min(maxSize.height(), std::max(minSize.height(), windowSize.height())); - ALOGE("Invalid Window Dimensions [%d, %d]; clamping to [%d, %d]", windowSize.width(), - windowSize.height(), width, height); - windowSize.set(width, height); - } - - windowInfo->actualSize = windowSize; - if (windowInfo->transform & HAL_TRANSFORM_ROT_90) { - windowInfo->actualSize.set(windowSize.height(), windowSize.width()); - } - - windowInfo->preTransform = GetPreTransformMatrix(windowInfo->size, windowInfo->transform); -} - -static bool ResetNativeWindow(ANativeWindow* window) { - // -- Reset the native window -- - // The native window might have been used previously, and had its properties - // changed from defaults. That will affect the answer we get for queries - // like MIN_UNDEQUEUED_BUFFERS. Reset to a known/default state before we - // attempt such queries. +static bool ConnectAndSetWindowDefaults(ANativeWindow* window) { + ATRACE_CALL(); int err = native_window_api_connect(window, NATIVE_WINDOW_API_EGL); if (err != 0) { - ALOGW("native_window_api_connect failed: %s (%d)", strerror(-err), err); + ALOGE("native_window_api_connect failed: %s (%d)", strerror(-err), err); return false; } // this will match what we do on GL so pick that here. err = window->setSwapInterval(window, 1); if (err != 0) { - ALOGW("native_window->setSwapInterval(1) failed: %s (%d)", strerror(-err), err); + ALOGE("native_window->setSwapInterval(1) failed: %s (%d)", strerror(-err), err); return false; } err = native_window_set_shared_buffer_mode(window, false); if (err != 0) { - ALOGW("native_window_set_shared_buffer_mode(false) failed: %s (%d)", strerror(-err), err); + ALOGE("native_window_set_shared_buffer_mode(false) failed: %s (%d)", strerror(-err), err); return false; } err = native_window_set_auto_refresh(window, false); if (err != 0) { - ALOGW("native_window_set_auto_refresh(false) failed: %s (%d)", strerror(-err), err); + ALOGE("native_window_set_auto_refresh(false) failed: %s (%d)", strerror(-err), err); return false; } - return true; -} + err = native_window_set_scaling_mode(window, NATIVE_WINDOW_SCALING_MODE_FREEZE); + if (err != 0) { + ALOGE("native_window_set_scaling_mode(NATIVE_WINDOW_SCALING_MODE_FREEZE) failed: %s (%d)", + strerror(-err), err); + return false; + } -class VkSurfaceAutoDeleter { -public: - VkSurfaceAutoDeleter(VkInstance instance, VkSurfaceKHR surface, - PFN_vkDestroySurfaceKHR destroySurfaceKHR) - : mInstance(instance), mSurface(surface), mDestroySurfaceKHR(destroySurfaceKHR) {} - ~VkSurfaceAutoDeleter() { destroy(); } - - void destroy() { - if (mSurface != VK_NULL_HANDLE) { - mDestroySurfaceKHR(mInstance, mSurface, nullptr); - mSurface = VK_NULL_HANDLE; - } + // Let consumer drive the size of the buffers. + err = native_window_set_buffers_dimensions(window, 0, 0); + if (err != 0) { + ALOGE("native_window_set_buffers_dimensions(0,0) failed: %s (%d)", strerror(-err), err); + return false; } -private: - VkInstance mInstance; - VkSurfaceKHR mSurface; - PFN_vkDestroySurfaceKHR mDestroySurfaceKHR; -}; + // Enable auto prerotation, so when buffer size is driven by the consumer + // and the transform hint specifies a 90 or 270 degree rotation, the width + // and height used for buffer pre-allocation and dequeueBuffer will be + // additionally swapped. + err = native_window_set_auto_prerotation(window, true); + if (err != 0) { + ALOGE("VulkanSurface::UpdateWindow() native_window_set_auto_prerotation failed: %s (%d)", + strerror(-err), err); + return false; + } + + return true; +} VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, SkColorType colorType, sk_sp<SkColorSpace> colorSpace, GrContext* grContext, const VulkanManager& vkManager, uint32_t extraBuffers) { - VkAndroidSurfaceCreateInfoKHR surfaceCreateInfo; - memset(&surfaceCreateInfo, 0, sizeof(VkAndroidSurfaceCreateInfoKHR)); - surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; - surfaceCreateInfo.pNext = nullptr; - surfaceCreateInfo.flags = 0; - surfaceCreateInfo.window = window; - - VkSurfaceKHR vkSurface = VK_NULL_HANDLE; - VkResult res = vkManager.mCreateAndroidSurfaceKHR(vkManager.mInstance, &surfaceCreateInfo, - nullptr, &vkSurface); - if (VK_SUCCESS != res) { - ALOGE("VulkanSurface::Create() vkCreateAndroidSurfaceKHR failed (%d)", res); + // Connect and set native window to default configurations. + if (!ConnectAndSetWindowDefaults(window)) { return nullptr; } - VkSurfaceAutoDeleter vkSurfaceDeleter(vkManager.mInstance, vkSurface, - vkManager.mDestroySurfaceKHR); - - SkDEBUGCODE(VkBool32 supported; res = vkManager.mGetPhysicalDeviceSurfaceSupportKHR( - vkManager.mPhysicalDevice, vkManager.mPresentQueueIndex, - vkSurface, &supported); - // All physical devices and queue families on Android must be capable of - // presentation with any native window. - SkASSERT(VK_SUCCESS == res && supported);); + // Initialize WindowInfo struct. + WindowInfo windowInfo; + if (!InitializeWindowInfoStruct(window, colorMode, colorType, colorSpace, vkManager, + extraBuffers, &windowInfo)) { + return nullptr; + } - // check for capabilities - VkSurfaceCapabilitiesKHR caps; - res = vkManager.mGetPhysicalDeviceSurfaceCapabilitiesKHR(vkManager.mPhysicalDevice, vkSurface, - &caps); - if (VK_SUCCESS != res) { - ALOGE("VulkanSurface::Create() vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed (%d)", res); + // Now we attempt to modify the window. + if (!UpdateWindow(window, windowInfo)) { return nullptr; } - LOG_ALWAYS_FATAL_IF(0 == (caps.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR)); + return new VulkanSurface(window, windowInfo, grContext); +} - /* - * We must destroy the VK Surface before attempting to update the window as doing so after - * will cause the native window to be modified in unexpected ways. - */ - vkSurfaceDeleter.destroy(); +bool VulkanSurface::InitializeWindowInfoStruct(ANativeWindow* window, ColorMode colorMode, + SkColorType colorType, + sk_sp<SkColorSpace> colorSpace, + const VulkanManager& vkManager, + uint32_t extraBuffers, WindowInfo* outWindowInfo) { + ATRACE_CALL(); - /* - * Populate Window Info struct - */ - WindowInfo windowInfo; + int width, height; + int err = window->query(window, NATIVE_WINDOW_DEFAULT_WIDTH, &width); + if (err != 0 || width < 0) { + ALOGE("window->query failed: %s (%d) value=%d", strerror(-err), err, width); + return false; + } + err = window->query(window, NATIVE_WINDOW_DEFAULT_HEIGHT, &height); + if (err != 0 || height < 0) { + ALOGE("window->query failed: %s (%d) value=%d", strerror(-err), err, height); + return false; + } + outWindowInfo->size = SkISize::Make(width, height); + + int query_value; + err = window->query(window, NATIVE_WINDOW_TRANSFORM_HINT, &query_value); + if (err != 0 || query_value < 0) { + ALOGE("window->query failed: %s (%d) value=%d", strerror(-err), err, query_value); + return false; + } + outWindowInfo->transform = query_value; - windowInfo.transform = ConvertVkTransformToNative(caps.supportedTransforms); - windowInfo.size = SkISize::Make(caps.currentExtent.width, caps.currentExtent.height); + outWindowInfo->actualSize = outWindowInfo->size; + if (outWindowInfo->transform & NATIVE_WINDOW_TRANSFORM_ROT_90) { + outWindowInfo->actualSize.set(outWindowInfo->size.height(), outWindowInfo->size.width()); + } - const SkISize minSize = SkISize::Make(caps.minImageExtent.width, caps.minImageExtent.height); - const SkISize maxSize = SkISize::Make(caps.maxImageExtent.width, caps.maxImageExtent.height); - ComputeWindowSizeAndTransform(&windowInfo, minSize, maxSize); + outWindowInfo->preTransform = + GetPreTransformMatrix(outWindowInfo->size, outWindowInfo->transform); - int query_value; - int err = window->query(window, NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &query_value); + err = window->query(window, NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &query_value); if (err != 0 || query_value < 0) { ALOGE("window->query failed: %s (%d) value=%d", strerror(-err), err, query_value); - return nullptr; + return false; } - auto min_undequeued_buffers = static_cast<uint32_t>(query_value); + outWindowInfo->bufferCount = + static_cast<uint32_t>(query_value) + sTargetBufferCount + extraBuffers; - windowInfo.bufferCount = min_undequeued_buffers + - std::max(sTargetBufferCount + extraBuffers, caps.minImageCount); - if (caps.maxImageCount > 0 && windowInfo.bufferCount > caps.maxImageCount) { + err = window->query(window, NATIVE_WINDOW_MAX_BUFFER_COUNT, &query_value); + if (err != 0 || query_value < 0) { + ALOGE("window->query failed: %s (%d) value=%d", strerror(-err), err, query_value); + return false; + } + if (outWindowInfo->bufferCount > static_cast<uint32_t>(query_value)) { // Application must settle for fewer images than desired: - windowInfo.bufferCount = caps.maxImageCount; + outWindowInfo->bufferCount = static_cast<uint32_t>(query_value); } - // Currently Skia requires the images to be color attachments and support all transfer - // operations. - VkImageUsageFlags usageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | - VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | - VK_IMAGE_USAGE_TRANSFER_DST_BIT; - LOG_ALWAYS_FATAL_IF((caps.supportedUsageFlags & usageFlags) != usageFlags); - - windowInfo.dataspace = HAL_DATASPACE_V0_SRGB; + outWindowInfo->dataspace = HAL_DATASPACE_V0_SRGB; if (colorMode == ColorMode::WideColorGamut) { skcms_Matrix3x3 surfaceGamut; LOG_ALWAYS_FATAL_IF(!colorSpace->toXYZD50(&surfaceGamut), "Could not get gamut matrix from color space"); if (memcmp(&surfaceGamut, &SkNamedGamut::kSRGB, sizeof(surfaceGamut)) == 0) { - windowInfo.dataspace = HAL_DATASPACE_V0_SCRGB; + outWindowInfo->dataspace = HAL_DATASPACE_V0_SCRGB; } else if (memcmp(&surfaceGamut, &SkNamedGamut::kDCIP3, sizeof(surfaceGamut)) == 0) { - windowInfo.dataspace = HAL_DATASPACE_DISPLAY_P3; + outWindowInfo->dataspace = HAL_DATASPACE_DISPLAY_P3; } else { LOG_ALWAYS_FATAL("Unreachable: unsupported wide color space."); } } - windowInfo.pixelFormat = ColorTypeToPixelFormat(colorType); + outWindowInfo->pixelFormat = ColorTypeToPixelFormat(colorType); VkFormat vkPixelFormat = VK_FORMAT_R8G8B8A8_UNORM; - if (windowInfo.pixelFormat == PIXEL_FORMAT_RGBA_FP16) { + if (outWindowInfo->pixelFormat == PIXEL_FORMAT_RGBA_FP16) { vkPixelFormat = VK_FORMAT_R16G16B16A16_SFLOAT; } @@ -275,7 +228,10 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, imageFormatInfo.format = vkPixelFormat; imageFormatInfo.type = VK_IMAGE_TYPE_2D; imageFormatInfo.tiling = VK_IMAGE_TILING_OPTIMAL; - imageFormatInfo.usage = usageFlags; + // Currently Skia requires the images to be color attachments and support all transfer + // operations. + imageFormatInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | + VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; imageFormatInfo.flags = 0; VkAndroidHardwareBufferUsageANDROID hwbUsage; @@ -286,35 +242,27 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, imgFormProps.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2; imgFormProps.pNext = &hwbUsage; - res = vkManager.mGetPhysicalDeviceImageFormatProperties2(vkManager.mPhysicalDevice, - &imageFormatInfo, &imgFormProps); + VkResult res = vkManager.mGetPhysicalDeviceImageFormatProperties2( + vkManager.mPhysicalDevice, &imageFormatInfo, &imgFormProps); if (VK_SUCCESS != res) { ALOGE("Failed to query GetPhysicalDeviceImageFormatProperties2"); - return nullptr; + return false; } uint64_t consumerUsage; - native_window_get_consumer_usage(window, &consumerUsage); - windowInfo.windowUsageFlags = consumerUsage | hwbUsage.androidHardwareBufferUsage; - - /* - * Now we attempt to modify the window! - */ - if (!UpdateWindow(window, windowInfo)) { - return nullptr; + err = native_window_get_consumer_usage(window, &consumerUsage); + if (err != 0) { + ALOGE("native_window_get_consumer_usage failed: %s (%d)", strerror(-err), err); + return false; } + outWindowInfo->windowUsageFlags = consumerUsage | hwbUsage.androidHardwareBufferUsage; - return new VulkanSurface(window, windowInfo, minSize, maxSize, grContext); + return true; } bool VulkanSurface::UpdateWindow(ANativeWindow* window, const WindowInfo& windowInfo) { ATRACE_CALL(); - if (!ResetNativeWindow(window)) { - return false; - } - - // -- Configure the native window -- int err = native_window_set_buffers_format(window, windowInfo.pixelFormat); if (err != 0) { ALOGE("VulkanSurface::UpdateWindow() native_window_set_buffers_format(%d) failed: %s (%d)", @@ -330,15 +278,6 @@ bool VulkanSurface::UpdateWindow(ANativeWindow* window, const WindowInfo& window return false; } - const SkISize& size = windowInfo.actualSize; - err = native_window_set_buffers_dimensions(window, size.width(), size.height()); - if (err != 0) { - ALOGE("VulkanSurface::UpdateWindow() native_window_set_buffers_dimensions(%d,%d) " - "failed: %s (%d)", - size.width(), size.height(), strerror(-err), err); - return false; - } - // native_window_set_buffers_transform() expects the transform the app is requesting that // the compositor perform during composition. With native windows, pre-transform works by // rendering with the same transform the compositor is applying (as in Vulkan), but @@ -353,16 +292,6 @@ bool VulkanSurface::UpdateWindow(ANativeWindow* window, const WindowInfo& window return false; } - // Vulkan defaults to NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW, but this is different than - // HWUI's expectation - err = native_window_set_scaling_mode(window, NATIVE_WINDOW_SCALING_MODE_FREEZE); - if (err != 0) { - ALOGE("VulkanSurface::UpdateWindow() native_window_set_scaling_mode(SCALE_TO_WINDOW) " - "failed: %s (%d)", - strerror(-err), err); - return false; - } - err = native_window_set_buffer_count(window, windowInfo.bufferCount); if (err != 0) { ALOGE("VulkanSurface::UpdateWindow() native_window_set_buffer_count(%zu) failed: %s (%d)", @@ -377,16 +306,12 @@ bool VulkanSurface::UpdateWindow(ANativeWindow* window, const WindowInfo& window return false; } - return err == 0; + return true; } VulkanSurface::VulkanSurface(ANativeWindow* window, const WindowInfo& windowInfo, - SkISize minWindowSize, SkISize maxWindowSize, GrContext* grContext) - : mNativeWindow(window) - , mWindowInfo(windowInfo) - , mGrContext(grContext) - , mMinWindowSize(minWindowSize) - , mMaxWindowSize(maxWindowSize) {} + GrContext* grContext) + : mNativeWindow(window), mWindowInfo(windowInfo), mGrContext(grContext) {} VulkanSurface::~VulkanSurface() { releaseBuffers(); @@ -429,56 +354,49 @@ VulkanSurface::NativeBufferInfo* VulkanSurface::dequeueNativeBuffer() { // value at the end of the function if everything dequeued correctly. mCurrentBufferInfo = nullptr; - // check if the native window has been resized or rotated and update accordingly - SkISize newSize = SkISize::MakeEmpty(); + // Query the transform hint synced from the initial Surface connect or last queueBuffer. The + // auto prerotation on the buffer is based on the same transform hint in use by the producer. int transformHint = 0; - mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_WIDTH, &newSize.fWidth); - mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_HEIGHT, &newSize.fHeight); - mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_TRANSFORM_HINT, &transformHint); - if (newSize != mWindowInfo.actualSize || transformHint != mWindowInfo.transform) { - WindowInfo newWindowInfo = mWindowInfo; - newWindowInfo.size = newSize; - newWindowInfo.transform = IsTransformSupported(transformHint) ? transformHint : 0; - ComputeWindowSizeAndTransform(&newWindowInfo, mMinWindowSize, mMaxWindowSize); - - int err = 0; - if (newWindowInfo.actualSize != mWindowInfo.actualSize) { - // reset the native buffers and update the window - err = native_window_set_buffers_dimensions(mNativeWindow.get(), - newWindowInfo.actualSize.width(), - newWindowInfo.actualSize.height()); - if (err != 0) { - ALOGE("native_window_set_buffers_dimensions(%d,%d) failed: %s (%d)", - newWindowInfo.actualSize.width(), newWindowInfo.actualSize.height(), - strerror(-err), err); - return nullptr; - } + int err = + mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_TRANSFORM_HINT, &transformHint); + + // Since auto pre-rotation is enabled, dequeueBuffer to get the consumer driven buffer size + // from ANativeWindowBuffer. + ANativeWindowBuffer* buffer; + int fence_fd; + err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buffer, &fence_fd); + if (err != 0) { + ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), err); + return nullptr; + } + + SkISize actualSize = SkISize::Make(buffer->width, buffer->height); + if (actualSize != mWindowInfo.actualSize || transformHint != mWindowInfo.transform) { + if (actualSize != mWindowInfo.actualSize) { // reset the NativeBufferInfo (including SkSurface) associated with the old buffers. The // new NativeBufferInfo storage will be populated lazily as we dequeue each new buffer. + mWindowInfo.actualSize = actualSize; releaseBuffers(); - // TODO should we ask the nativewindow to allocate buffers? } - if (newWindowInfo.transform != mWindowInfo.transform) { + if (transformHint != mWindowInfo.transform) { err = native_window_set_buffers_transform(mNativeWindow.get(), - InvertTransform(newWindowInfo.transform)); + InvertTransform(transformHint)); if (err != 0) { - ALOGE("native_window_set_buffers_transform(%d) failed: %s (%d)", - newWindowInfo.transform, strerror(-err), err); - newWindowInfo.transform = mWindowInfo.transform; - ComputeWindowSizeAndTransform(&newWindowInfo, mMinWindowSize, mMaxWindowSize); + ALOGE("native_window_set_buffers_transform(%d) failed: %s (%d)", transformHint, + strerror(-err), err); + mNativeWindow->cancelBuffer(mNativeWindow.get(), buffer, fence_fd); + return nullptr; } + mWindowInfo.transform = transformHint; } - mWindowInfo = newWindowInfo; - } + mWindowInfo.size = actualSize; + if (mWindowInfo.transform & NATIVE_WINDOW_TRANSFORM_ROT_90) { + mWindowInfo.size.set(actualSize.height(), actualSize.width()); + } - ANativeWindowBuffer* buffer; - int fence_fd; - int err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buffer, &fence_fd); - if (err != 0) { - ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), err); - return nullptr; + mWindowInfo.preTransform = GetPreTransformMatrix(mWindowInfo.size, mWindowInfo.transform); } uint32_t idx; diff --git a/libs/hwui/renderthread/VulkanSurface.h b/libs/hwui/renderthread/VulkanSurface.h index b7af596ae762..5fa860a20916 100644 --- a/libs/hwui/renderthread/VulkanSurface.h +++ b/libs/hwui/renderthread/VulkanSurface.h @@ -101,11 +101,12 @@ private: SkMatrix preTransform; }; - VulkanSurface(ANativeWindow* window, const WindowInfo& windowInfo, SkISize minWindowSize, - SkISize maxWindowSize, GrContext* grContext); + VulkanSurface(ANativeWindow* window, const WindowInfo& windowInfo, GrContext* grContext); + static bool InitializeWindowInfoStruct(ANativeWindow* window, ColorMode colorMode, + SkColorType colorType, sk_sp<SkColorSpace> colorSpace, + const VulkanManager& vkManager, uint32_t extraBuffers, + WindowInfo* outWindowInfo); static bool UpdateWindow(ANativeWindow* window, const WindowInfo& windowInfo); - static void ComputeWindowSizeAndTransform(WindowInfo* windowInfo, const SkISize& minSize, - const SkISize& maxSize); void releaseBuffers(); // TODO: Just use a vector? @@ -117,11 +118,8 @@ private: uint32_t mPresentCount = 0; NativeBufferInfo* mCurrentBufferInfo = nullptr; - - const SkISize mMinWindowSize; - const SkISize mMaxWindowSize; }; } /* namespace renderthread */ } /* namespace uirenderer */ -} /* namespace android */
\ No newline at end of file +} /* namespace android */ diff --git a/libs/hwui/tests/common/scenes/BitmapShaders.cpp b/libs/hwui/tests/common/scenes/BitmapShaders.cpp index 510766073b08..400196b203b9 100644 --- a/libs/hwui/tests/common/scenes/BitmapShaders.cpp +++ b/libs/hwui/tests/common/scenes/BitmapShaders.cpp @@ -46,14 +46,12 @@ public: SkPaint paint; sk_sp<SkImage> image = hwuiBitmap->makeImage(); sk_sp<SkShader> repeatShader = - image->makeShader(SkShader::TileMode::kRepeat_TileMode, - SkShader::TileMode::kRepeat_TileMode, nullptr); + image->makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat); paint.setShader(std::move(repeatShader)); canvas.drawRoundRect(0, 0, 500, 500, 50.0f, 50.0f, paint); sk_sp<SkShader> mirrorShader = - image->makeShader(SkShader::TileMode::kMirror_TileMode, - SkShader::TileMode::kMirror_TileMode, nullptr); + image->makeShader(SkTileMode::kMirror, SkTileMode::kMirror); paint.setShader(std::move(mirrorShader)); canvas.drawRoundRect(0, 600, 500, 1100, 50.0f, 50.0f, paint); } diff --git a/libs/hwui/tests/common/scenes/HwBitmapInCompositeShader.cpp b/libs/hwui/tests/common/scenes/HwBitmapInCompositeShader.cpp index 2af955fbb711..659926bae06f 100644 --- a/libs/hwui/tests/common/scenes/HwBitmapInCompositeShader.cpp +++ b/libs/hwui/tests/common/scenes/HwBitmapInCompositeShader.cpp @@ -60,10 +60,10 @@ public: colors[0] = Color::Black; colors[1] = Color::White; sk_sp<SkShader> gradientShader = SkGradientShader::MakeRadial( - center, 50, colors, nullptr, 2, SkShader::TileMode::kRepeat_TileMode); + center, 50, colors, nullptr, 2, SkTileMode::kRepeat); sk_sp<SkShader> compositeShader( - SkShader::MakeComposeShader(hardwareShader, gradientShader, SkBlendMode::kDstATop)); + SkShaders::Blend(SkBlendMode::kDstATop, hardwareShader, gradientShader)); SkPaint paint; paint.setShader(std::move(compositeShader)); @@ -74,7 +74,6 @@ public: sk_sp<SkShader> createBitmapShader(Bitmap& bitmap) { sk_sp<SkImage> image = bitmap.makeImage(); - return image->makeShader(SkShader::TileMode::kClamp_TileMode, - SkShader::TileMode::kClamp_TileMode); + return image->makeShader(); } }; diff --git a/libs/hwui/tests/common/scenes/ListOfFadedTextAnimation.cpp b/libs/hwui/tests/common/scenes/ListOfFadedTextAnimation.cpp index ecaaf487e4f8..c6b60aaec9c5 100644 --- a/libs/hwui/tests/common/scenes/ListOfFadedTextAnimation.cpp +++ b/libs/hwui/tests/common/scenes/ListOfFadedTextAnimation.cpp @@ -44,7 +44,7 @@ class ListOfFadedTextAnimation : public TestListViewSceneBase { SkColor colors[2] = {Color::Black, Color::Transparent}; sk_sp<SkShader> s( - SkGradientShader::MakeLinear(pts, colors, NULL, 2, SkShader::kClamp_TileMode)); + SkGradientShader::MakeLinear(pts, colors, NULL, 2, SkTileMode::kClamp)); SkMatrix matrix; matrix.setScale(1, length); diff --git a/libs/hwui/tests/common/scenes/ListViewAnimation.cpp b/libs/hwui/tests/common/scenes/ListViewAnimation.cpp index feb881f654f8..fb7e34dfa513 100644 --- a/libs/hwui/tests/common/scenes/ListViewAnimation.cpp +++ b/libs/hwui/tests/common/scenes/ListViewAnimation.cpp @@ -53,7 +53,7 @@ class ListViewAnimation : public TestListViewSceneBase { char charToShow = 'A' + (rand() % 26); const SkPoint pos = {SkIntToScalar(size / 2), /*approximate centering*/ SkFloatToScalar(size * 0.7f)}; - canvas.drawSimpleText(&charToShow, 1, kUTF8_SkTextEncoding, pos.fX, pos.fY, font, paint); + canvas.drawSimpleText(&charToShow, 1, SkTextEncoding::kUTF8, pos.fX, pos.fY, font, paint); return bitmap; } diff --git a/libs/hwui/tests/common/scenes/SimpleColorMatrixAnimation.cpp b/libs/hwui/tests/common/scenes/SimpleColorMatrixAnimation.cpp index ff0cb3705cb8..e60bd5fae198 100644 --- a/libs/hwui/tests/common/scenes/SimpleColorMatrixAnimation.cpp +++ b/libs/hwui/tests/common/scenes/SimpleColorMatrixAnimation.cpp @@ -53,20 +53,12 @@ private: x, y, x + width, y + height, [width, height](RenderProperties& props, Canvas& canvas) { SkPaint paint; - float matrix[20] = {0}; - // Simple scale/translate case where R, G, and B are all treated equivalently - matrix[SkColorMatrix::kR_Scale] = 1.1f; - matrix[SkColorMatrix::kG_Scale] = 1.1f; - matrix[SkColorMatrix::kB_Scale] = 1.1f; - matrix[SkColorMatrix::kA_Scale] = 0.5f; - - matrix[SkColorMatrix::kR_Trans] = 5.0f; - matrix[SkColorMatrix::kG_Trans] = 5.0f; - matrix[SkColorMatrix::kB_Trans] = 5.0f; - matrix[SkColorMatrix::kA_Trans] = 10.0f; + SkColorMatrix cm; + cm.setScale(1.1f, 1.1f, 1.1f, 0.5f); + cm.postTranslate(5.0f/255, 5.0f/255, 5.0f/255, 10.0f/255); - paint.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix)); + paint.setColorFilter(SkColorFilters::Matrix(cm)); // set a shader so it's not likely for the matrix to be optimized away (since a // clever @@ -75,7 +67,7 @@ private: SkPoint pts[] = {SkPoint::Make(0, 0), SkPoint::Make(width, height)}; SkColor colors[2] = {Color::DeepPurple_500, Color::DeepOrange_500}; paint.setShader(SkGradientShader::MakeLinear(pts, colors, pos, 2, - SkShader::kClamp_TileMode)); + SkTileMode::kClamp)); // overdraw several times to emphasize shader cost for (int i = 0; i < 10; i++) { diff --git a/libs/hwui/tests/common/scenes/SimpleGradientAnimation.cpp b/libs/hwui/tests/common/scenes/SimpleGradientAnimation.cpp index 016c65c17c4c..8bd804e75674 100644 --- a/libs/hwui/tests/common/scenes/SimpleGradientAnimation.cpp +++ b/libs/hwui/tests/common/scenes/SimpleGradientAnimation.cpp @@ -57,7 +57,7 @@ private: // use i%2 start position to pick 2 color combo with black in it SkColor colors[3] = {Color::Transparent, Color::Black, Color::Cyan_500}; paint.setShader(SkGradientShader::MakeLinear(pts, colors + (i % 2), pos, 2, - SkShader::kClamp_TileMode)); + SkTileMode::kClamp)); canvas.drawRect(i, i, width, height, paint); } }); diff --git a/libs/hwui/tests/common/scenes/TvApp.cpp b/libs/hwui/tests/common/scenes/TvApp.cpp index 229c7f392629..76f02888f994 100644 --- a/libs/hwui/tests/common/scenes/TvApp.cpp +++ b/libs/hwui/tests/common/scenes/TvApp.cpp @@ -219,7 +219,7 @@ private: image.get())); SkPaint paint; sk_sp<SkColorFilter> filter( - SkColorFilter::MakeModeFilter((curFrame % 150) << 24, SkBlendMode::kSrcATop)); + SkColorFilters::Blend((curFrame % 150) << 24, SkBlendMode::kSrcATop)); paint.setColorFilter(filter); sk_sp<Bitmap> bitmap = mCachedBitmaps[ci]; canvas->drawBitmap(*bitmap, 0, 0, &paint); diff --git a/libs/hwui/tests/macrobench/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp index 9c845f04e820..22d5abbd3dbc 100644 --- a/libs/hwui/tests/macrobench/TestSceneRunner.cpp +++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp @@ -146,7 +146,7 @@ void run(const TestScene::Info& info, const TestScene::Options& opts, } for (int i = 0; i < warmupFrameCount; i++) { testContext.waitForVsync(); - nsecs_t vsync = systemTime(CLOCK_MONOTONIC); + nsecs_t vsync = systemTime(SYSTEM_TIME_MONOTONIC); UiFrameInfoBuilder(proxy->frameInfo()).setVsync(vsync, vsync); proxy->syncAndDrawFrame(); } @@ -161,10 +161,10 @@ void run(const TestScene::Info& info, const TestScene::Options& opts, ModifiedMovingAverage<double> avgMs(opts.reportFrametimeWeight); - nsecs_t start = systemTime(CLOCK_MONOTONIC); + nsecs_t start = systemTime(SYSTEM_TIME_MONOTONIC); for (int i = 0; i < opts.count; i++) { testContext.waitForVsync(); - nsecs_t vsync = systemTime(CLOCK_MONOTONIC); + nsecs_t vsync = systemTime(SYSTEM_TIME_MONOTONIC); { ATRACE_NAME("UI-Draw Frame"); UiFrameInfoBuilder(proxy->frameInfo()).setVsync(vsync, vsync); @@ -173,7 +173,7 @@ void run(const TestScene::Info& info, const TestScene::Options& opts, } if (opts.reportFrametimeWeight) { proxy->fence(); - nsecs_t done = systemTime(CLOCK_MONOTONIC); + nsecs_t done = systemTime(SYSTEM_TIME_MONOTONIC); avgMs.add((done - vsync) / 1000000.0); if (i % 10 == 9) { printf("Average frametime %.3fms\n", avgMs.average()); @@ -181,7 +181,7 @@ void run(const TestScene::Info& info, const TestScene::Options& opts, } } proxy->fence(); - nsecs_t end = systemTime(CLOCK_MONOTONIC); + nsecs_t end = systemTime(SYSTEM_TIME_MONOTONIC); if (reporter) { outputBenchmarkReport(info, opts, reporter, proxy.get(), (end - start) / (double)s2ns(1)); diff --git a/libs/hwui/tests/microbench/main.cpp b/libs/hwui/tests/microbench/main.cpp index b5abf5bc5efa..9c4d25968d60 100644 --- a/libs/hwui/tests/microbench/main.cpp +++ b/libs/hwui/tests/microbench/main.cpp @@ -14,9 +14,6 @@ * limitations under the License. */ -#include "debug/GlesDriver.h" -#include "debug/NullGlesDriver.h" - #include "hwui/Typeface.h" #include <benchmark/benchmark.h> @@ -24,10 +21,8 @@ #include <memory> using namespace android; -using namespace android::uirenderer; int main(int argc, char** argv) { - debug::GlesDriver::replace(std::make_unique<debug::NullGlesDriver>()); benchmark::Initialize(&argc, argv); Typeface::setRobotoTypefaceForTest(); benchmark::RunSpecifiedBenchmarks(); diff --git a/libs/hwui/tests/scripts/skp-capture.sh b/libs/hwui/tests/scripts/skp-capture.sh index 54fa22929586..aad31fcc8eb9 100755 --- a/libs/hwui/tests/scripts/skp-capture.sh +++ b/libs/hwui/tests/scripts/skp-capture.sh @@ -4,6 +4,12 @@ # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# +# Before this can be used, the device must be rooted and the filesystem must be writable by Skia +# - These steps are necessary once after flashing to enable capture - +# adb root +# adb remount +# adb reboot if [ -z "$1" ]; then printf 'Usage:\n skp-capture.sh PACKAGE_NAME OPTIONAL_FRAME_COUNT\n\n' @@ -20,8 +26,8 @@ if ! command -v adb > /dev/null 2>&1; then exit 2 fi fi -phase1_timeout_seconds=15 -phase2_timeout_seconds=60 +phase1_timeout_seconds=60 +phase2_timeout_seconds=300 package="$1" filename="$(date '+%H%M%S').skp" remote_path="/data/data/${package}/cache/${filename}" @@ -29,11 +35,14 @@ local_path_prefix="$(date '+%Y-%m-%d_%H%M%S')_${package}" local_path="${local_path_prefix}.skp" enable_capture_key='debug.hwui.capture_skp_enabled' enable_capture_value=$(adb shell "getprop '${enable_capture_key}'") -#printf 'captureflag=' "$enable_capture_value" '\n' + +# TODO(nifong): check if filesystem is writable here with "avbctl get-verity" +# result will either start with "verity is disabled" or "verity is enabled" + if [ -z "$enable_capture_value" ]; then - printf 'Capture SKP property need to be enabled first. Please use\n' - printf "\"adb shell setprop debug.hwui.capture_skp_enabled true\" and then restart\n" - printf "the process.\n\n" + printf 'debug.hwui.capture_skp_enabled was found to be disabled, enabling it now.\n' + printf " restart the process you want to capture on the device, then retry this script.\n\n" + adb shell "setprop '${enable_capture_key}' true" exit 1 fi if [ ! -z "$2" ]; then @@ -57,12 +66,18 @@ banner() { printf ' %s' "$*" printf '\n=====================\n' } -banner '...WAITING...' -adb_test_exist() { - test '0' = "$(adb shell "test -e \"$1\"; echo \$?")"; +banner '...WAITING FOR APP INTERACTION...' +# Waiting for nonzero file is an indication that the pipeline has both opened the file and written +# the header. With multiple frames this does not occur until the last frame has been recorded, +# so we continue to show the "waiting for app interaction" message as long as the app still requires +# interaction to draw more frames. +adb_test_file_nonzero() { + # grab first byte of `du` output + X="$(adb shell "du \"$1\" 2> /dev/null | dd bs=1 count=1 2> /dev/null")" + test "$X" && test "$X" -ne 0 } timeout=$(( $(date +%s) + $phase1_timeout_seconds)) -while ! adb_test_exist "$remote_path"; do +while ! adb_test_file_nonzero "$remote_path"; do spin 0.05 if [ $(date +%s) -gt $timeout ] ; then printf '\bTimed out.\n' @@ -72,20 +87,27 @@ while ! adb_test_exist "$remote_path"; do done printf '\b' -#read -n1 -r -p "Press any key to continue..." key +# Disable further capturing +adb shell "setprop '${filename_key}' ''" banner '...SAVING...' -adb_test_file_nonzero() { - # grab first byte of `du` output - X="$(adb shell "du \"$1\" 2> /dev/null | dd bs=1 count=1 2> /dev/null")" - test "$X" && test "$X" -ne 0 +# return the size of a file in bytes +adb_filesize() { + adb shell "wc -c \"$1\"" 2> /dev/null | awk '{print $1}' } -#adb_filesize() { -# adb shell "wc -c \"$1\"" 2> /dev/null | awk '{print $1}' -#} timeout=$(( $(date +%s) + $phase2_timeout_seconds)) -while ! adb_test_file_nonzero "$remote_path"; do +last_size='0' # output of last size check command +unstable=true # false once the file size stops changing +counter=0 # used to perform size check only 1/sec though we update spinner 20/sec +# loop until the file size is unchanged for 1 second. +while [ $unstable != 0 ] ; do spin 0.05 + counter=$(( $counter+1 )) + if ! (( $counter % 20)) ; then + new_size=$(adb_filesize "$remote_path") + unstable=$(($(adb_filesize "$remote_path") != last_size)) + last_size=$new_size + fi if [ $(date +%s) -gt $timeout ] ; then printf '\bTimed out.\n' adb shell "setprop '${filename_key}' ''" @@ -94,7 +116,7 @@ while ! adb_test_file_nonzero "$remote_path"; do done printf '\b' -adb shell "setprop '${filename_key}' ''" +printf "SKP file serialized: %s\n" $(echo $last_size | numfmt --to=iec) i=0; while [ $i -lt 10 ]; do spin 0.10; i=$(($i + 1)); done; echo @@ -105,12 +127,4 @@ if ! [ -f "$local_path" ] ; then fi adb shell rm "$remote_path" printf '\nSKP saved to file:\n %s\n\n' "$local_path" -if [ ! -z "$2" ]; then - bridge="_" - adb shell "setprop 'debug.hwui.capture_skp_frames' ''" - for i in $(seq 2 $2); do - adb pull "${remote_path}_${i}" "${local_path_prefix}_${i}.skp" - adb shell rm "${remote_path}_${i}" - done -fi diff --git a/libs/hwui/tests/unit/SkiaBehaviorTests.cpp b/libs/hwui/tests/unit/SkiaBehaviorTests.cpp index df5f45618070..7951537e1525 100644 --- a/libs/hwui/tests/unit/SkiaBehaviorTests.cpp +++ b/libs/hwui/tests/unit/SkiaBehaviorTests.cpp @@ -48,14 +48,14 @@ TEST(SkiaBehavior, lightingColorFilter_simplify) { SkColor observedColor; SkBlendMode observedMode; - ASSERT_TRUE(filter->asColorMode(&observedColor, &observedMode)); + ASSERT_TRUE(filter->asAColorMode(&observedColor, &observedMode)); EXPECT_EQ(0xFF223344, observedColor); EXPECT_EQ(SkBlendMode::kModulate, observedMode); } { sk_sp<SkColorFilter> failFilter(SkColorMatrixFilter::MakeLightingFilter(0x11223344, 0x1)); - EXPECT_FALSE(failFilter->asColorMode(nullptr, nullptr)); + EXPECT_FALSE(failFilter->asAColorMode(nullptr, nullptr)); } } diff --git a/libs/hwui/tests/unit/SkiaPipelineTests.cpp b/libs/hwui/tests/unit/SkiaPipelineTests.cpp index a671bdada09a..7b76bd80de4d 100644 --- a/libs/hwui/tests/unit/SkiaPipelineTests.cpp +++ b/libs/hwui/tests/unit/SkiaPipelineTests.cpp @@ -29,6 +29,7 @@ #include "pipeline/skia/SkiaRecordingCanvas.h" #include "pipeline/skia/SkiaUtils.h" #include "renderthread/CanvasContext.h" +#include "tests/common/TestContext.h" #include "tests/common/TestUtils.h" #include <gui/BufferItemConsumer.h> @@ -424,17 +425,9 @@ RENDERTHREAD_SKIA_PIPELINE_TEST(SkiaPipeline, clip_replace) { EXPECT_EQ(1, surface->canvas()->mDrawCounter); } -static sp<Surface> createDummySurface() { - sp<IGraphicBufferProducer> producer; - sp<IGraphicBufferConsumer> consumer; - BufferQueue::createBufferQueue(&producer, &consumer); - producer->setMaxDequeuedBufferCount(1); - producer->setAsyncMode(true); - return new Surface(producer); -} - RENDERTHREAD_SKIA_PIPELINE_TEST(SkiaPipeline, context_lost) { - auto surface = createDummySurface(); + test::TestContext context; + auto surface = context.surface(); auto pipeline = std::make_unique<SkiaOpenGLPipeline>(renderThread); EXPECT_FALSE(pipeline->isSurfaceReady()); EXPECT_TRUE(pipeline->setSurface(surface.get(), SwapBehavior::kSwap_default, ColorMode::SRGB, 0)); diff --git a/libs/hwui/tests/unit/VectorDrawableTests.cpp b/libs/hwui/tests/unit/VectorDrawableTests.cpp index 5db002862fcd..60fd7a753f2d 100644 --- a/libs/hwui/tests/unit/VectorDrawableTests.cpp +++ b/libs/hwui/tests/unit/VectorDrawableTests.cpp @@ -395,7 +395,7 @@ TEST(VectorDrawable, drawPathWithoutIncrementingShaderRefCount) { bitmap.allocN32Pixels(5, 5, false); SkCanvas canvas(bitmap); - sk_sp<SkShader> shader = SkShader::MakeColorShader(SK_ColorBLACK); + sk_sp<SkShader> shader = SkShaders::Color(SK_ColorBLACK); // Initial ref count is 1 EXPECT_TRUE(shader->unique()); diff --git a/libs/hwui/tests/unit/main.cpp b/libs/hwui/tests/unit/main.cpp index 83d888c310f0..402cb5814366 100644 --- a/libs/hwui/tests/unit/main.cpp +++ b/libs/hwui/tests/unit/main.cpp @@ -18,8 +18,6 @@ #include "gtest/gtest.h" #include "Properties.h" -#include "debug/GlesDriver.h" -#include "debug/NullGlesDriver.h" #include "hwui/Typeface.h" #include "tests/common/LeakChecker.h" @@ -65,7 +63,6 @@ int main(int argc, char* argv[]) { } // Replace the default GLES driver - debug::GlesDriver::replace(std::make_unique<debug::NullGlesDriver>()); Properties::isolatedProcess = true; // Run the tests diff --git a/libs/hwui/thread/WorkQueue.h b/libs/hwui/thread/WorkQueue.h index 42f8503fd000..46b8bc07b432 100644 --- a/libs/hwui/thread/WorkQueue.h +++ b/libs/hwui/thread/WorkQueue.h @@ -31,7 +31,7 @@ namespace android::uirenderer { struct MonotonicClock { - static nsecs_t now() { return systemTime(CLOCK_MONOTONIC); } + static nsecs_t now() { return systemTime(SYSTEM_TIME_MONOTONIC); } }; class WorkQueue { diff --git a/libs/hwui/utils/GLUtils.cpp b/libs/hwui/utils/GLUtils.cpp index c694e93f7e21..61897627d842 100644 --- a/libs/hwui/utils/GLUtils.cpp +++ b/libs/hwui/utils/GLUtils.cpp @@ -21,19 +21,10 @@ #include "GLUtils.h" -#if DEBUG_OPENGL >= DEBUG_LEVEL_HIGH && !defined(HWUI_GLES_WRAP_ENABLED) -#error Setting DEBUG_OPENGL to HIGH requires setting HWUI_ENABLE_OPENGL_VALIDATION to true in the Android.mk! -#endif - namespace android { namespace uirenderer { bool GLUtils::dumpGLErrors() { -#if DEBUG_OPENGL >= DEBUG_LEVEL_HIGH - // If DEBUG_LEVEL_HIGH is set then every GLES call is already wrapped - // and asserts that there was no error. So this can just return success. - return false; -#else bool errorObserved = false; GLenum status = GL_NO_ERROR; while ((status = glGetError()) != GL_NO_ERROR) { @@ -56,7 +47,6 @@ bool GLUtils::dumpGLErrors() { } } return errorObserved; -#endif } const char* GLUtils::getGLFramebufferError() { diff --git a/libs/hwui/utils/HostColorSpace.cpp b/libs/hwui/utils/HostColorSpace.cpp new file mode 100644 index 000000000000..77a6820c6999 --- /dev/null +++ b/libs/hwui/utils/HostColorSpace.cpp @@ -0,0 +1,417 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// This is copied from framework/native/libs/ui in order not to include libui in host build + +#include <ui/ColorSpace.h> + +using namespace std::placeholders; + +namespace android { + +static constexpr float linearResponse(float v) { + return v; +} + +static constexpr float rcpResponse(float x, const ColorSpace::TransferParameters& p) { + return x >= p.d * p.c ? (std::pow(x, 1.0f / p.g) - p.b) / p.a : x / p.c; +} + +static constexpr float response(float x, const ColorSpace::TransferParameters& p) { + return x >= p.d ? std::pow(p.a * x + p.b, p.g) : p.c * x; +} + +static constexpr float rcpFullResponse(float x, const ColorSpace::TransferParameters& p) { + return x >= p.d * p.c ? (std::pow(x - p.e, 1.0f / p.g) - p.b) / p.a : (x - p.f) / p.c; +} + +static constexpr float fullResponse(float x, const ColorSpace::TransferParameters& p) { + return x >= p.d ? std::pow(p.a * x + p.b, p.g) + p.e : p.c * x + p.f; +} + +static float absRcpResponse(float x, float g,float a, float b, float c, float d) { + float xx = std::abs(x); + return std::copysign(xx >= d * c ? (std::pow(xx, 1.0f / g) - b) / a : xx / c, x); +} + +static float absResponse(float x, float g, float a, float b, float c, float d) { + float xx = std::abs(x); + return std::copysign(xx >= d ? std::pow(a * xx + b, g) : c * xx, x); +} + +static float safePow(float x, float e) { + return powf(x < 0.0f ? 0.0f : x, e); +} + +static ColorSpace::transfer_function toOETF(const ColorSpace::TransferParameters& parameters) { + if (parameters.e == 0.0f && parameters.f == 0.0f) { + return std::bind(rcpResponse, _1, parameters); + } + return std::bind(rcpFullResponse, _1, parameters); +} + +static ColorSpace::transfer_function toEOTF( const ColorSpace::TransferParameters& parameters) { + if (parameters.e == 0.0f && parameters.f == 0.0f) { + return std::bind(response, _1, parameters); + } + return std::bind(fullResponse, _1, parameters); +} + +static ColorSpace::transfer_function toOETF(float gamma) { + if (gamma == 1.0f) { + return linearResponse; + } + return std::bind(safePow, _1, 1.0f / gamma); +} + +static ColorSpace::transfer_function toEOTF(float gamma) { + if (gamma == 1.0f) { + return linearResponse; + } + return std::bind(safePow, _1, gamma); +} + +static constexpr std::array<float2, 3> computePrimaries(const mat3& rgbToXYZ) { + float3 r(rgbToXYZ * float3{1, 0, 0}); + float3 g(rgbToXYZ * float3{0, 1, 0}); + float3 b(rgbToXYZ * float3{0, 0, 1}); + + return {{r.xy / dot(r, float3{1}), + g.xy / dot(g, float3{1}), + b.xy / dot(b, float3{1})}}; +} + +static constexpr float2 computeWhitePoint(const mat3& rgbToXYZ) { + float3 w(rgbToXYZ * float3{1}); + return w.xy / dot(w, float3{1}); +} + +ColorSpace::ColorSpace( + const std::string& name, + const mat3& rgbToXYZ, + transfer_function OETF, + transfer_function EOTF, + clamping_function clamper) noexcept + : mName(name) + , mRGBtoXYZ(rgbToXYZ) + , mXYZtoRGB(inverse(rgbToXYZ)) + , mOETF(std::move(OETF)) + , mEOTF(std::move(EOTF)) + , mClamper(std::move(clamper)) + , mPrimaries(computePrimaries(rgbToXYZ)) + , mWhitePoint(computeWhitePoint(rgbToXYZ)) { +} + +ColorSpace::ColorSpace( + const std::string& name, + const mat3& rgbToXYZ, + const TransferParameters parameters, + clamping_function clamper) noexcept + : mName(name) + , mRGBtoXYZ(rgbToXYZ) + , mXYZtoRGB(inverse(rgbToXYZ)) + , mParameters(parameters) + , mOETF(toOETF(mParameters)) + , mEOTF(toEOTF(mParameters)) + , mClamper(std::move(clamper)) + , mPrimaries(computePrimaries(rgbToXYZ)) + , mWhitePoint(computeWhitePoint(rgbToXYZ)) { +} + +ColorSpace::ColorSpace( + const std::string& name, + const mat3& rgbToXYZ, + float gamma, + clamping_function clamper) noexcept + : mName(name) + , mRGBtoXYZ(rgbToXYZ) + , mXYZtoRGB(inverse(rgbToXYZ)) + , mParameters({gamma, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}) + , mOETF(toOETF(gamma)) + , mEOTF(toEOTF(gamma)) + , mClamper(std::move(clamper)) + , mPrimaries(computePrimaries(rgbToXYZ)) + , mWhitePoint(computeWhitePoint(rgbToXYZ)) { +} + +ColorSpace::ColorSpace( + const std::string& name, + const std::array<float2, 3>& primaries, + const float2& whitePoint, + transfer_function OETF, + transfer_function EOTF, + clamping_function clamper) noexcept + : mName(name) + , mRGBtoXYZ(computeXYZMatrix(primaries, whitePoint)) + , mXYZtoRGB(inverse(mRGBtoXYZ)) + , mOETF(std::move(OETF)) + , mEOTF(std::move(EOTF)) + , mClamper(std::move(clamper)) + , mPrimaries(primaries) + , mWhitePoint(whitePoint) { +} + +ColorSpace::ColorSpace( + const std::string& name, + const std::array<float2, 3>& primaries, + const float2& whitePoint, + const TransferParameters parameters, + clamping_function clamper) noexcept + : mName(name) + , mRGBtoXYZ(computeXYZMatrix(primaries, whitePoint)) + , mXYZtoRGB(inverse(mRGBtoXYZ)) + , mParameters(parameters) + , mOETF(toOETF(mParameters)) + , mEOTF(toEOTF(mParameters)) + , mClamper(std::move(clamper)) + , mPrimaries(primaries) + , mWhitePoint(whitePoint) { +} + +ColorSpace::ColorSpace( + const std::string& name, + const std::array<float2, 3>& primaries, + const float2& whitePoint, + float gamma, + clamping_function clamper) noexcept + : mName(name) + , mRGBtoXYZ(computeXYZMatrix(primaries, whitePoint)) + , mXYZtoRGB(inverse(mRGBtoXYZ)) + , mParameters({gamma, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}) + , mOETF(toOETF(gamma)) + , mEOTF(toEOTF(gamma)) + , mClamper(std::move(clamper)) + , mPrimaries(primaries) + , mWhitePoint(whitePoint) { +} + +constexpr mat3 ColorSpace::computeXYZMatrix( + const std::array<float2, 3>& primaries, const float2& whitePoint) { + const float2& R = primaries[0]; + const float2& G = primaries[1]; + const float2& B = primaries[2]; + const float2& W = whitePoint; + + float oneRxRy = (1 - R.x) / R.y; + float oneGxGy = (1 - G.x) / G.y; + float oneBxBy = (1 - B.x) / B.y; + float oneWxWy = (1 - W.x) / W.y; + + float RxRy = R.x / R.y; + float GxGy = G.x / G.y; + float BxBy = B.x / B.y; + float WxWy = W.x / W.y; + + float BY = + ((oneWxWy - oneRxRy) * (GxGy - RxRy) - (WxWy - RxRy) * (oneGxGy - oneRxRy)) / + ((oneBxBy - oneRxRy) * (GxGy - RxRy) - (BxBy - RxRy) * (oneGxGy - oneRxRy)); + float GY = (WxWy - RxRy - BY * (BxBy - RxRy)) / (GxGy - RxRy); + float RY = 1 - GY - BY; + + float RYRy = RY / R.y; + float GYGy = GY / G.y; + float BYBy = BY / B.y; + + return { + float3{RYRy * R.x, RY, RYRy * (1 - R.x - R.y)}, + float3{GYGy * G.x, GY, GYGy * (1 - G.x - G.y)}, + float3{BYBy * B.x, BY, BYBy * (1 - B.x - B.y)} + }; +} + +const ColorSpace ColorSpace::sRGB() { + return { + "sRGB IEC61966-2.1", + {{float2{0.640f, 0.330f}, {0.300f, 0.600f}, {0.150f, 0.060f}}}, + {0.3127f, 0.3290f}, + {2.4f, 1 / 1.055f, 0.055f / 1.055f, 1 / 12.92f, 0.04045f, 0.0f, 0.0f} + }; +} + +const ColorSpace ColorSpace::linearSRGB() { + return { + "sRGB IEC61966-2.1 (Linear)", + {{float2{0.640f, 0.330f}, {0.300f, 0.600f}, {0.150f, 0.060f}}}, + {0.3127f, 0.3290f} + }; +} + +const ColorSpace ColorSpace::extendedSRGB() { + return { + "scRGB-nl IEC 61966-2-2:2003", + {{float2{0.640f, 0.330f}, {0.300f, 0.600f}, {0.150f, 0.060f}}}, + {0.3127f, 0.3290f}, + std::bind(absRcpResponse, _1, 2.4f, 1 / 1.055f, 0.055f / 1.055f, 1 / 12.92f, 0.04045f), + std::bind(absResponse, _1, 2.4f, 1 / 1.055f, 0.055f / 1.055f, 1 / 12.92f, 0.04045f), + std::bind(clamp<float>, _1, -0.799f, 2.399f) + }; +} + +const ColorSpace ColorSpace::linearExtendedSRGB() { + return { + "scRGB IEC 61966-2-2:2003", + {{float2{0.640f, 0.330f}, {0.300f, 0.600f}, {0.150f, 0.060f}}}, + {0.3127f, 0.3290f}, + 1.0f, + std::bind(clamp<float>, _1, -0.5f, 7.499f) + }; +} + +const ColorSpace ColorSpace::NTSC() { + return { + "NTSC (1953)", + {{float2{0.67f, 0.33f}, {0.21f, 0.71f}, {0.14f, 0.08f}}}, + {0.310f, 0.316f}, + {1 / 0.45f, 1 / 1.099f, 0.099f / 1.099f, 1 / 4.5f, 0.081f, 0.0f, 0.0f} + }; +} + +const ColorSpace ColorSpace::BT709() { + return { + "Rec. ITU-R BT.709-5", + {{float2{0.640f, 0.330f}, {0.300f, 0.600f}, {0.150f, 0.060f}}}, + {0.3127f, 0.3290f}, + {1 / 0.45f, 1 / 1.099f, 0.099f / 1.099f, 1 / 4.5f, 0.081f, 0.0f, 0.0f} + }; +} + +const ColorSpace ColorSpace::BT2020() { + return { + "Rec. ITU-R BT.2020-1", + {{float2{0.708f, 0.292f}, {0.170f, 0.797f}, {0.131f, 0.046f}}}, + {0.3127f, 0.3290f}, + {1 / 0.45f, 1 / 1.099f, 0.099f / 1.099f, 1 / 4.5f, 0.081f, 0.0f, 0.0f} + }; +} + +const ColorSpace ColorSpace::AdobeRGB() { + return { + "Adobe RGB (1998)", + {{float2{0.64f, 0.33f}, {0.21f, 0.71f}, {0.15f, 0.06f}}}, + {0.3127f, 0.3290f}, + 2.2f + }; +} + +const ColorSpace ColorSpace::ProPhotoRGB() { + return { + "ROMM RGB ISO 22028-2:2013", + {{float2{0.7347f, 0.2653f}, {0.1596f, 0.8404f}, {0.0366f, 0.0001f}}}, + {0.34567f, 0.35850f}, + {1.8f, 1.0f, 0.0f, 1 / 16.0f, 0.031248f, 0.0f, 0.0f} + }; +} + +const ColorSpace ColorSpace::DisplayP3() { + return { + "Display P3", + {{float2{0.680f, 0.320f}, {0.265f, 0.690f}, {0.150f, 0.060f}}}, + {0.3127f, 0.3290f}, + {2.4f, 1 / 1.055f, 0.055f / 1.055f, 1 / 12.92f, 0.039f, 0.0f, 0.0f} + }; +} + +const ColorSpace ColorSpace::DCIP3() { + return { + "SMPTE RP 431-2-2007 DCI (P3)", + {{float2{0.680f, 0.320f}, {0.265f, 0.690f}, {0.150f, 0.060f}}}, + {0.314f, 0.351f}, + 2.6f + }; +} + +const ColorSpace ColorSpace::ACES() { + return { + "SMPTE ST 2065-1:2012 ACES", + {{float2{0.73470f, 0.26530f}, {0.0f, 1.0f}, {0.00010f, -0.0770f}}}, + {0.32168f, 0.33767f}, + 1.0f, + std::bind(clamp<float>, _1, -65504.0f, 65504.0f) + }; +} + +const ColorSpace ColorSpace::ACEScg() { + return { + "Academy S-2014-004 ACEScg", + {{float2{0.713f, 0.293f}, {0.165f, 0.830f}, {0.128f, 0.044f}}}, + {0.32168f, 0.33767f}, + 1.0f, + std::bind(clamp<float>, _1, -65504.0f, 65504.0f) + }; +} + +std::unique_ptr<float3[]> ColorSpace::createLUT(uint32_t size, const ColorSpace& src, + const ColorSpace& dst) { + size = clamp(size, 2u, 256u); + float m = 1.0f / float(size - 1); + + std::unique_ptr<float3[]> lut(new float3[size * size * size]); + float3* data = lut.get(); + + ColorSpaceConnector connector(src, dst); + + for (uint32_t z = 0; z < size; z++) { + for (int32_t y = int32_t(size - 1); y >= 0; y--) { + for (uint32_t x = 0; x < size; x++) { + *data++ = connector.transform({x * m, y * m, z * m}); + } + } + } + + return lut; +} + +static const float2 ILLUMINANT_D50_XY = {0.34567f, 0.35850f}; +static const float3 ILLUMINANT_D50_XYZ = {0.964212f, 1.0f, 0.825188f}; +static const mat3 BRADFORD = mat3{ + float3{ 0.8951f, -0.7502f, 0.0389f}, + float3{ 0.2664f, 1.7135f, -0.0685f}, + float3{-0.1614f, 0.0367f, 1.0296f} +}; + +static mat3 adaptation(const mat3& matrix, const float3& srcWhitePoint, const float3& dstWhitePoint) { + float3 srcLMS = matrix * srcWhitePoint; + float3 dstLMS = matrix * dstWhitePoint; + return inverse(matrix) * mat3{dstLMS / srcLMS} * matrix; +} + +ColorSpaceConnector::ColorSpaceConnector( + const ColorSpace& src, + const ColorSpace& dst) noexcept + : mSource(src) + , mDestination(dst) { + + if (all(lessThan(abs(src.getWhitePoint() - dst.getWhitePoint()), float2{1e-3f}))) { + mTransform = dst.getXYZtoRGB() * src.getRGBtoXYZ(); + } else { + mat3 rgbToXYZ(src.getRGBtoXYZ()); + mat3 xyzToRGB(dst.getXYZtoRGB()); + + float3 srcXYZ = ColorSpace::XYZ(float3{src.getWhitePoint(), 1}); + float3 dstXYZ = ColorSpace::XYZ(float3{dst.getWhitePoint(), 1}); + + if (any(greaterThan(abs(src.getWhitePoint() - ILLUMINANT_D50_XY), float2{1e-3f}))) { + rgbToXYZ = adaptation(BRADFORD, srcXYZ, ILLUMINANT_D50_XYZ) * src.getRGBtoXYZ(); + } + + if (any(greaterThan(abs(dst.getWhitePoint() - ILLUMINANT_D50_XY), float2{1e-3f}))) { + xyzToRGB = inverse(adaptation(BRADFORD, dstXYZ, ILLUMINANT_D50_XYZ) * dst.getRGBtoXYZ()); + } + + mTransform = xyzToRGB * rgbToXYZ; + } +} + +}; // namespace android diff --git a/libs/hwui/utils/TraceUtils.h b/libs/hwui/utils/TraceUtils.h index 1869d00396c0..e61b4be1784e 100644 --- a/libs/hwui/utils/TraceUtils.h +++ b/libs/hwui/utils/TraceUtils.h @@ -16,6 +16,7 @@ #ifndef TRACE_UTILS_H #define TRACE_UTILS_H +#include <cutils/trace.h> #include <utils/Trace.h> #define ATRACE_FORMAT(fmt, ...) \ |