Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73defb8d authored by Jiwen 'Steve' Cai's avatar Jiwen 'Steve' Cai Committed by android-build-merger
Browse files

Merge "Split libdvr_headers from libdvr: Step 1" into oc-dev am: 2eb4922a

am: 41b7c72e

Change-Id: I3a9231506b463c6915df0330db852cd1b62bcfe3
parents 6a3c05bc 41b7c72e
Loading
Loading
Loading
Loading
+67 −0
Original line number Diff line number Diff line
// Copyright (C) 2017 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.


cc_library_headers {
    name: "libdvr_headers",
    owner: "google",
    export_include_dirs: ["include"],
}

cc_library_static {
    name: "libdvr",
    owner: "google",

    cflags: [
        "-fvisibility=hidden",
        "-DLOG_TAG=\"libdvr\"",
        "-DDVR_EXPORT=__attribute__((visibility(\"default\")))",
    ],

    header_libs: ["libdvr_headers"],
    export_header_lib_headers: ["libdvr_headers"],

    srcs: [
        "dvr_api.cpp",
        "dvr_buffer.cpp",
        "dvr_buffer_queue.cpp",
        "dvr_display_manager.cpp",
        "dvr_hardware_composer_client.cpp",
        "dvr_surface.cpp",
        "dvr_vsync.cpp",
    ],

    static_libs: [
        "libbufferhub",
        "libbufferhubqueue",
        "libdisplay",
        "libvrsensor",
        "libvirtualtouchpadclient",
        "libvr_hwc-impl",
        "libvr_hwc-binder",
        "libgrallocusage",
    ],

    shared_libs: [
        "android.hardware.graphics.bufferqueue@1.0",
        "android.hidl.token@1.0-utils",
        "libbase",
        "libnativewindow",
    ],

}

subdirs = [
    "tests",
]

libs/vr/libdvr/Android.mk

deleted100644 → 0
+0 −59
Original line number Diff line number Diff line
# Copyright (C) 2017 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.
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := libdvr
LOCAL_MODULE_OWNER := google
LOCAL_MODULE_CLASS := STATIC_LIBRARIES

LOCAL_CFLAGS += \
    -fvisibility=hidden \
    -DLOG_TAG=\"libdvr\" \
    -D DVR_EXPORT='__attribute__ ((visibility ("default")))'

LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/include \

LOCAL_EXPORT_C_INCLUDE_DIRS := \
    $(LOCAL_PATH)/include \

LOCAL_SRC_FILES := \
    dvr_api.cpp \
    dvr_buffer.cpp \
    dvr_buffer_queue.cpp \
    dvr_display_manager.cpp \
    dvr_hardware_composer_client.cpp \
    dvr_surface.cpp \
    dvr_vsync.cpp \

LOCAL_STATIC_LIBRARIES := \
    libbufferhub \
    libbufferhubqueue \
    libdisplay \
    libvrsensor \
    libvirtualtouchpadclient \
    libvr_hwc-impl \
    libvr_hwc-binder \
    libgrallocusage \

LOCAL_SHARED_LIBRARIES := \
    android.hardware.graphics.bufferqueue@1.0 \
    android.hidl.token@1.0-utils \
    libbase \
    libnativewindow \

include $(BUILD_STATIC_LIBRARY)

include $(call all-makefiles-under,$(LOCAL_PATH))
+4 −7
Original line number Diff line number Diff line
@@ -262,13 +262,10 @@ typedef DvrHwcRecti (*DvrHwcFrameGetLayerDamagedRegionPtr)(DvrHwcFrame* frame,

// The buffer metadata that an Android Surface (a.k.a. ANativeWindow)
// will populate. A DvrWriteBufferQueue must be created with this metadata iff
// ANativeWindow access is needed. Note that this struct must stay in sync with
// BufferHubQueueCore::NativeBufferMetadata. Please do not remove, modify, or
// reorder existing data members. If new fields need to be added, please take
// extra care to make sure that new data field is padded properly the size of
// the struct stays same.
// TODO(b/37578558) Move |dvr_api.h| into a header library so that this
// structure won't be copied between |dvr_api.h| and |buffer_hub_qeue_core.h|.
// ANativeWindow access is needed. Please do not remove, modify, or reorder
// existing data members. If new fields need to be added, please take extra care
// to make sure that new data field is padded properly the size of the struct
// stays same.
struct DvrNativeBufferMetadata {
  // Timestamp of the frame.
  int64_t timestamp;
+53 −0
Original line number Diff line number Diff line
// Copyright (C) 2017 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.

shared_libraries = [
    "libbase",
    "libbinder",
    "libcutils",
    "libgui",
    "liblog",
    "libhardware",
    "libui",
    "libutils",
    "libnativewindow",
]

static_libraries = [
    "libdvr",
    "libbufferhubqueue",
    "libbufferhub",
    "libchrome",
    "libdvrcommon",
    "libdisplay",
    "libpdx_default_transport",
]

cc_test {
    srcs: [
        "dvr_buffer_queue-test.cpp",
        "dvr_display_manager-test.cpp",
        "dvr_named_buffer-test.cpp",
    ],

    static_libs: static_libraries,
    shared_libs: shared_libraries,
    cflags: [
        "-DLOG_TAG=\"dvr_api-test\"",
        "-DTRACE=0",
        "-O0",
        "-g",
    ],
    name: "dvr_api-test",
}

libs/vr/libdvr/tests/Android.mk

deleted100644 → 0
+0 −35
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)

shared_libraries := \
    libbase \
    libbinder \
    libcutils \
    libgui \
    liblog \
    libhardware \
    libui \
    libutils \
    libnativewindow \

static_libraries := \
    libdvr \
    libbufferhubqueue \
    libbufferhub \
    libchrome \
    libdvrcommon \
    libdisplay \
    libpdx_default_transport \

include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
    dvr_buffer_queue-test.cpp \
    dvr_display_manager-test.cpp \
    dvr_named_buffer-test.cpp \

LOCAL_STATIC_LIBRARIES := $(static_libraries)
LOCAL_SHARED_LIBRARIES := $(shared_libraries)
LOCAL_EXPORT_C_INCLUDE_DIRS := ${LOCAL_C_INCLUDES}
LOCAL_CFLAGS := -DLOG_TAG=\"dvr_api-test\" -DTRACE=0 -O0 -g
LOCAL_MODULE := dvr_api-test
LOCAL_MODULE_TAGS := optional
include $(BUILD_NATIVE_TEST)