mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 09:25:25 +00:00
Make dawn_platform a component.
Bug: None Change-Id: I29c20cd3dac759afee23bdaf5a4391081e29cbaa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31900 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
2b6b0f45ff
commit
973d145df8
@@ -14,11 +14,16 @@
|
||||
|
||||
import("../../scripts/dawn_overrides_with_defaults.gni")
|
||||
|
||||
source_set("dawn_platform") {
|
||||
configs += [ "${dawn_root}/src/common:dawn_internal" ]
|
||||
import("${dawn_root}/scripts/dawn_component.gni")
|
||||
|
||||
dawn_component("dawn_platform") {
|
||||
DEFINE_PREFIX = "DAWN_PLATFORM"
|
||||
|
||||
configs = [ "${dawn_root}/src/common:dawn_internal" ]
|
||||
|
||||
sources = [
|
||||
"${dawn_root}/src/include/dawn_platform/DawnPlatform.h",
|
||||
"${dawn_root}/src/include/dawn_platform/dawn_platform_export.h",
|
||||
"DawnPlatform.cpp",
|
||||
"tracing/EventTracer.cpp",
|
||||
"tracing/EventTracer.h",
|
||||
|
||||
@@ -12,9 +12,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
add_library(dawn_platform STATIC ${DAWN_DUMMY_FILE})
|
||||
add_library(dawn_platform ${DAWN_DUMMY_FILE})
|
||||
|
||||
target_compile_definitions(dawn_platform PRIVATE "DAWN_PLATFORM_IMPLEMENTATION")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(dawn_platform PRIVATE "DAWN_PLATFORM_SHARED_LIBRARY")
|
||||
endif()
|
||||
|
||||
target_sources(dawn_platform PRIVATE
|
||||
"${DAWN_INCLUDE_DIR}/dawn_platform/DawnPlatform.h"
|
||||
"${DAWN_INCLUDE_DIR}/dawn_platform/dawn_platform_export.h"
|
||||
"DawnPlatform.cpp"
|
||||
"tracing/EventTracer.cpp"
|
||||
"tracing/EventTracer.h"
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
#ifndef DAWNPLATFORM_TRACING_EVENTTRACER_H_
|
||||
#define DAWNPLATFORM_TRACING_EVENTTRACER_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "dawn_platform/dawn_platform_export.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace dawn_platform {
|
||||
|
||||
@@ -26,20 +28,22 @@ namespace dawn_platform {
|
||||
|
||||
using TraceEventHandle = uint64_t;
|
||||
|
||||
const unsigned char* GetTraceCategoryEnabledFlag(Platform* platform,
|
||||
TraceCategory category);
|
||||
DAWN_PLATFORM_EXPORT const unsigned char* GetTraceCategoryEnabledFlag(
|
||||
Platform* platform,
|
||||
TraceCategory category);
|
||||
|
||||
// TODO(enga): Simplify this API.
|
||||
TraceEventHandle AddTraceEvent(Platform* platform,
|
||||
char phase,
|
||||
const unsigned char* categoryGroupEnabled,
|
||||
const char* name,
|
||||
uint64_t id,
|
||||
int numArgs,
|
||||
const char** argNames,
|
||||
const unsigned char* argTypes,
|
||||
const uint64_t* argValues,
|
||||
unsigned char flags);
|
||||
DAWN_PLATFORM_EXPORT TraceEventHandle
|
||||
AddTraceEvent(Platform* platform,
|
||||
char phase,
|
||||
const unsigned char* categoryGroupEnabled,
|
||||
const char* name,
|
||||
uint64_t id,
|
||||
int numArgs,
|
||||
const char** argNames,
|
||||
const unsigned char* argTypes,
|
||||
const uint64_t* argValues,
|
||||
unsigned char flags);
|
||||
|
||||
} // namespace tracing
|
||||
} // namespace dawn_platform
|
||||
|
||||
Reference in New Issue
Block a user