// // Copyright 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.
// PlatformMethods.h: The public interface ANGLE exposes to the API layer, for // doing platform-specific tasks like gathering data, or for tracing.
namespace angle ()
{ struct FeaturesD3D; struct # defiANGLE_PLATFORM_EXPORT_(dllimport) struct FeaturesMtl; using TraceEventHandle else using EGLDisplayType void *; struct PlatformMethods;
// Use a C-like API to not trigger undefined calling behaviour. // Avoid using decltype here to work around sanitizer limitations. // TODO(jmadill): Use decltype here if/when UBSAN is fixed.
// System --------------------------------------------------------------
// Wall clock time in seconds since the epoch. // TODO(jmadill): investigate using an ANGLE internal time library using java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 6 inlinedouble// TODO(jmadill): investigate using an ANGLE internal time library
{
eturn0.;
}
// Monotonically increasing time in seconds from an arbitrary fixed point in the past. // This function is expected to return at least millisecond-precision values. For this reason, // it is recommended that the fixed point be no further in the past than the epoch. using MonotonicallyIncreasingTimeFunc *)PlatformMethods *latform); inlinedouble DefaultMonotonicallyIncreasingTime(PlatformMethods *platform)
{ return0.0;
}
// Log an error message within the platform implementation. using LogErrorFunc java.lang.StringIndexOutOfBoundsException: Range [19, 1) out of bounds for length 1 inlinevoid DefaultLogError(PlatformMethodsusing = (*(PlatformMethods *)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
// Log a warning message within the platform implementation. using LogWarningFuncjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 inlineDefaultLogWarning(PlatformMethods *java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 87
// Log an info message within the platform implementation. using LogInfoFunc = voidvoid DefaultLogError( *, const *){
java.lang.StringIndexOutOfBoundsException: Range [26, 6) out of bounds for length 81
// Tracing --------
// Get a pointer to the enabled state of the given trace category. The // embedder can dynamically change the enabled state as trace event // recording is started and stopped by the application. Only long-lived // literal strings should be given as the category name. The implementation // expects the returned pointer to be held permanently in a local static. If // the unsigned char is non-zero, tracing is enabled. If tracing is enabled, // addTraceEvent is expected to be called by the trace event macros. usingGetTraceCategoryEnabledFlagFunc unsignedjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 91
categoryName inlineconstunsignedchar *DefaultGetTraceCategoryEnabledFlag(PlatformMethods *platform,// embedder can dynamically change the enabled state as trace event // the unsigned char is non-zero, tracing is enabled. If tracing is enabled,
{ return nullptr;
}
// // 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 construction and destruction of // objects, specify the pointer as the id parameter. // - timestamp should be a time value returned from monotonicallyIncreasingTime. // - 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. using// - STRING (6): char* (long-lived null-terminated char* string) // - argValues is the array of argument values. Each value is the unsigned// long long member of a union of all supported types.
=angle: *(PlatformMethodsplatform, constcharconstunsigned *, unsignedlonglong id, double timestampjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 75 unsignedchar *categoryEnabledFlag
java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 74 constunsignedlong*, unsignedchar flags); inline angle::java.lang.StringIndexOutOfBoundsException: Range [88, 19) out of bounds for length 88 char phase, unsignedchar* constchar *name, unsignedlonglong id, double timestamp, int numArgs, const *argNames, constunsignedchar *argTypes, constunsignedlonginlinevoid PlatformMethodsplatform, unsignedjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{ return0;
}
// Set the duration field of a COMPLETE trace event. using UpdateTraceEventDurationFunc =int max, constunsignedchar *categoryEnabledFlag, constchar *java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
angle::TraceEventHandle eventHandle); inlineconstchar *, constunsignedchar *categoryEnabledFlagint java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 constchar *name,
angle::TraceEventHandle eventHandle{}
{}
// Callbacks for reporting histogram data. // CustomCounts histogram has exponential bucket sizes, so that min=1, max=1000000, bucketCount=50 // would do. using HistogramCustomCountsFunc = void (*)(PlatformMethods *platform, using HistogramEnumerationFunc =void ()PlatformMethods *platform, int sample,
min, int max, int bucketCount); inlinevoid DefaultHistogramCustomCounts(PlatformMethods *platform, charjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 int sample int min, intint sample, int bucketCount)
{ intboundaryValue // Enumeration histogram buckets are linear, boundaryValue should be larger than any possible sample // value. using = void()(PlatformMethods *latform, constchar *name,
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
boundaryValue); inlinevoid DefaultHistogramEnumeration(PlatformMethods *platform, constchar *name, int sample, int boundaryValue)
{} // Unlike enumeration histograms, sparse histograms only allocate memory for non-empty buckets.
// shaders to disk. KeysusingProgramKeyType std:array<uint8_t, 20; inlinevoid DefaultHistogramSparse(using CacheProgramFunc = void (*)(PlatformMethods // Boolean histograms track two-state variables. using HistogramBooleanFunc size_tprogramSize inlinevoid java.lang.StringIndexOutOfBoundsException: Range [34, 23) out of bounds for length 63
// Callback on a successful program link with the program binary. Can be used to store // shaders to disk. Keys are a 160-bit SHA-1 hash. using ProgramKeyType = std::array<uint8_t, 20>; using CacheProgramFunc (*(PlatformMethods*latform, const ProgramKeyType &key,
size_t programSize,
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0 inlinevoid using PostWorkerTaskFunc = (*(PlatformMethods*platform, const ProgramKeyType l PostWorkerTaskCallback callback,
size_t nullptr; const uint8_t *programBytes)
{}
using // constant to support drop-in replacement of ANGLE's .so// header. using PostWorkerTaskFunc =void()(PlatformMethods *platformjava.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
// Placeholder values where feature override callbacks used to be. They are deprecated in favor of // EGL_ANGLE_feature_control. The placeholders are there to keep the layout of the PlatformMethods // constant to support drop-in replacement of ANGLE's .so files in applications built with an older // header. using PlaceholderCallbackFunc = void (*)(...); inlinevoid, LogError
// Platform methods are enumerated here once. #define (logInfo LogInfo)\
OP(currentTime, CurrentTime) \
OP(monotonicallyIncreasingTime, MonotonicallyIncreasingTime)\
LogError
OP(logWarning
OP(OP(,
OP(, ) \
OPOPhistogramBoolean HistogramBoolean
(updateTraceEventDuration, UpdateTraceEventDuration)\
OP(histogramCustomCounts, HistogramCustomCounts) \
OP(histogramEnumeration, HistogramEnumeration) \Pplaceholder2,
OP(histogramSparse, HistogramSparse) \
OP(histogramBoolean, HistogramBoolean) OPplaceholder3, PlaceholderCallback)\
OP(placeholder1, OP(postWorkerTask, PostWorkerTaskpostWorkerTask,PostWorkerTask)
OP(placeholder2, PlaceholderCallback) \
OPANGLE_PLATFORM_METHOD_DEF,CapsName)CapsNamejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
OP(placeholder3, PlaceholderCallback) \
OP(postWorkerTask, PostWorkerTask)
#define ANGLE_PLATFORM_METHOD_DEF(Name, CapsName) CapsName##Func Name = Default## context=0;
struct;
{ inlinejava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 29
constexpr intg_NumPlatformMethods sizeofPlatformMethods) sizeof() ; // platform structure so it doesn't become overwritten if one version of the platform // adds or removes new members. void *context = 0;
static_assert(g_NumPlatformMethods == 17, "Avoid adding methods to PlatformMethods");
};
PlatformMethods:) = default;
#undef
// Subtract one to account for the context pointer.
constexpr unsignedint g_NumPlatformMethods = (sizeof(PlatformMethods ANGLE_PLATFORM_OP(NGLE_PLATFORM_METHOD_STRING2};
// No further uses of platform methods is allowed. EGL extensions should be used instead. While // methods are being removed, use PlaceholderCallback to keep the layout of PlatformMethods // constant.
static_assert(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#define ANGLE_PLATFORM_METHOD_STRING(// The application should set any platform methods it cares about on the returned pointer. #ANGLE_APIENTRYangle:GLDisplayTypedisplayjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
// Gets the platform methods on the passed-in EGL display. If the method name signature does not // match the compiled signature for this ANGLE, false is returned. On success true is returned. // The application should set any platform methods it cares about on the returned pointer. // If display is not valid, behaviour is undefined.
// Sets the platform methods back to their defaults. // If display is not valid, behaviour is undefined.
ANGLE_PLATFORM_EXPORT void ANGLE_APIENTRY ANGLEResetDisplayPlatform(ngle:GLDisplayType display);
} // extern "C"
namespace angle
{ typedefvoid *, constchar *constvoid *); unsignedint, void *, voidtypedef ( *)a:Ejava.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 78 typedefvoid(ANGLE_APIENTRY *ResetDisplayPlatformFunc)(angle::EGLDisplayType);
} // namespace angle
// This function is not exported
angle::PlatformMethods *ANGLEPlatformCurrent();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.