summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/include/platform
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@intopalo.com>2015-04-08 17:04:36 +0300
committerAndrew Knight <qt@panimo.net>2015-04-09 10:31:12 +0000
commita218a252c4200cfe7048de81a46f7e48349084d5 (patch)
treec1a82865d97e610cd0abb3a1360408363b38205b /src/3rdparty/angle/include/platform
parent331ddacfca90c91c5b44484bf3c78e2aa5b85947 (diff)
Upgrade ANGLE to 2.1~99f075dade7c
This aligns with Chromium branch 2356. This version brings more complete OpenGL ES 3 support as well as various bug fixes and performance improvements. The following changes were made to earlier patches: -0000-General-fixes-for-ANGLE-2.1 Removed. All changes are now handled elsewhere. +0001-ANGLE-Improve-Windows-Phone-support Consolidated remaining parts from 0009/0010. +0002-ANGLE-Fix-compilation-with-MinGW Remaining issues from patch 0016. +0003-ANGLE-Fix-compilation-with-MSVC2010 Remaining issues from patch 0015. +0004-ANGLE-Dynamically-load-D3D-compiler-from-list Renamed from patch 0008. +0005-ANGLE-Add-support-for-querying-platform-device Renamed from patch 0013. -0004-Make-it-possible-to-link-ANGLE-statically-for-single Removed. Fixed by adding defines to project files. -0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-or-t Renamed to patch 0005. -0009-ANGLE-Support-WinRT Removed. Mostly fixed upstream; remaining parts in patch 0001. -0010-ANGLE-Enable-D3D11-for-feature-level-9-cards Removed. Mostly fixed upstream; remaining parts in patch 0001. -0012-ANGLE-fix-semantic-index-lookup Removed. Fixed upstream. -0013-ANGLE-Add-support-for-querying-platform-device Renamed to patch 0005. -0014-Let-ANGLE-use-multithreaded-devices-if-necessary Removed. No longer needed. -0015-ANGLE-Fix-angle-d3d11-on-MSVC2010 Moved remaining parts to patch 0003. -0016-ANGLE-Fix-compilation-with-MinGW-D3D11 Moved remaining parts to patch 0002. -0017-ANGLE-Fix-compilation-with-D3D9 Removed. Fixed upstream. -0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11 Removed. Fixed upstream. -0019-ANGLE-Fix-handling-of-shader-source-with-fixed-lengt Removed. Fixed upstream. -0020-ANGLE-Do-not-use-std-strlen Removed. Fixed upstream. -0020-ANGLE-Fix-compilation-with-MSVC2013-Update4 Removed. Fixed upstream. [ChangeLog][Third-party libraries] ANGLE was updated to Chromium branch 2356 (2.1~99f075dade7c). Change-Id: I32ccbfe95e10986bd94be7191dfd53445ea09158 Task-number: QTBUG-44815 Task-number: QTBUG-37660 Task-number: QTBUG-44694 Task-number: QTBUG-42443 Reviewed-by: Andrew Knight <qt@panimo.net> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/angle/include/platform')
-rw-r--r--src/3rdparty/angle/include/platform/Platform.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/src/3rdparty/angle/include/platform/Platform.h b/src/3rdparty/angle/include/platform/Platform.h
new file mode 100644
index 0000000000..d915d5c0fd
--- /dev/null
+++ b/src/3rdparty/angle/include/platform/Platform.h
@@ -0,0 +1,112 @@
+//
+// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Platform.h: The public interface ANGLE exposes to the API layer, for
+// doing platform-specific tasks like gathering data, or for tracing.
+
+#ifndef ANGLE_PLATFORM_H
+#define ANGLE_PLATFORM_H
+
+#include <stdint.h>
+
+#include "../export.h"
+
+namespace angle
+{
+
+class Platform
+{
+ public:
+
+ // Tracing --------
+
+ typedef uint64_t TraceEventHandle;
+
+ // Add a trace event to the platform tracing system. Depending on the actual
+ // enabled state, this event may be recorded or dropped.
+ // - phase specifies the type of event:
+ // - BEGIN ('B'): Marks the beginning of a scoped event.
+ // - END ('E'): Marks the end of a scoped event.
+ // - COMPLETE ('X'): Marks the beginning of a scoped event, but doesn't
+ // need a matching END event. Instead, at the end of the scope,
+ // updateTraceEventDuration() must be called with the TraceEventHandle
+ // returned from addTraceEvent().
+ // - INSTANT ('I'): Standalone, instantaneous event.
+ // - START ('S'): Marks the beginning of an asynchronous event (the end
+ // event can occur in a different scope or thread). The id parameter is
+ // used to match START/FINISH pairs.
+ // - FINISH ('F'): Marks the end of an asynchronous event.
+ // - COUNTER ('C'): Used to trace integer quantities that change over
+ // time. The argument values are expected to be of type int.
+ // - METADATA ('M'): Reserved for internal use.
+ // - categoryEnabled is the pointer returned by getTraceCategoryEnabledFlag.
+ // - name is the name of the event. Also used to match BEGIN/END and
+ // START/FINISH pairs.
+ // - id optionally allows events of the same name to be distinguished from
+ // each other. For example, to trace the consutruction and destruction of
+ // objects, specify the pointer as the id parameter.
+ // - numArgs specifies the number of elements in argNames, argTypes, and
+ // argValues.
+ // - argNames is the array of argument names. Use long-lived literal strings
+ // or specify the COPY flag.
+ // - argTypes is the array of argument types:
+ // - BOOL (1): bool
+ // - UINT (2): unsigned long long
+ // - INT (3): long long
+ // - DOUBLE (4): double
+ // - POINTER (5): void*
+ // - STRING (6): char* (long-lived null-terminated char* string)
+ // - COPY_STRING (7): char* (temporary null-terminated char* string)
+ // - CONVERTABLE (8): WebConvertableToTraceFormat
+ // - argValues is the array of argument values. Each value is the unsigned
+ // long long member of a union of all supported types.
+ // - flags can be 0 or one or more of the following, ORed together:
+ // - COPY (0x1): treat all strings (name, argNames and argValues of type
+ // string) as temporary so that they will be copied by addTraceEvent.
+ // - HAS_ID (0x2): use the id argument to uniquely identify the event for
+ // matching with other events of the same name.
+ // - MANGLE_ID (0x4): specify this flag if the id parameter is the value
+ // of a pointer.
+ virtual TraceEventHandle addTraceEvent(char phase,
+ const unsigned char *categoryEnabledFlag,
+ const char *name,
+ unsigned long long id,
+ double timestamp,
+ int numArgs,
+ const char **argNames,
+ const unsigned char *argTypes,
+ const unsigned long long *argValues,
+ unsigned char flags)
+ {
+ return 0;
+ }
+
+ // Set the duration field of a COMPLETE trace event.
+ virtual void updateTraceEventDuration(const unsigned char* categoryEnabledFlag, const char* name, TraceEventHandle) { }
+
+ // Callbacks for reporting histogram data.
+ // CustomCounts histogram has exponential bucket sizes, so that min=1, max=1000000, bucketCount=50 would do.
+ virtual void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount) { }
+ // Enumeration histogram buckets are linear, boundaryValue should be larger than any possible sample value.
+ virtual void histogramEnumeration(const char* name, int sample, int boundaryValue) { }
+ // Unlike enumeration histograms, sparse histograms only allocate memory for non-empty buckets.
+ virtual void histogramSparse(const char* name, int sample) { }
+
+ protected:
+ virtual ~Platform() { }
+};
+
+}
+
+typedef void(*ANGLEPlatformInitializeFunc)(angle::Platform*);
+ANGLE_EXPORT void ANGLEPlatformInitialize(angle::Platform*);
+
+typedef void (*ANGLEPlatformShutdownFunc)();
+ANGLE_EXPORT void ANGLEPlatformShutdown();
+
+typedef angle::Platform *(*ANGLEPlatformCurrentFunc)();
+ANGLE_EXPORT angle::Platform *ANGLEPlatformCurrent();
+
+#endif // ANGLE_PLATFORM_H