12 Commits
Author SHA1 Message Date
Serdar Kocdemir 4e4d7b621f Move screenshot function to PostWorker from PostWorkerGl
Implementation does not directly depend on GL and should work
fine for PostWorkekVk as well.

Bug: 389646068
Test: take screenshot
Change-Id: Icaaa59a76fbdf717ceb8e9a911cae6e4d67e901f
2025-09-04 19:31:59 +00:00
Jason Macnak c2b159afd1 Move logging to common
and add Android support which uses __android_log_print to
the default callback. This will allow us to eventually build
and run the guest libs in a standalone bazel environment without
Android libs (no "liblog", "libcutils", etc).

Misc notes:

 * Updates some cases of ANDROID vs __ANDROID__. The former is
   set when building with Soong (either host or guest) while the
   latter is set specifically when targeting the Android platform.
   Some places that were using ANDROID needed to be fixed to use
   __ANDROID__ to properly detect when to use ANativeWindow.

 * Updates the EGL platform header to address something similar
   to the above where we may want to use X11 display when building
   host binaries with Soong where ANDROID may still be defined.

Bug: b/416342919

Test: cd hardware/google/gfxstream
      bazel build ...
      bazel test ...

Test: cd hardware/google/gfxstream
      mma

Test: cd hardware/google/gfxstream
      mkdir build && cd build
      cmake .. -G Ninja
      ninja

Test: meson setup \
        -Ddefault_library=static \
        -Dgfxstream-build=host \
        build

      meson compile -C build

Test: cd <emu main dev repo>
      cd external/qemu
      python android/build/python/cmake.py --gfxstream

Test: cd <emu main next repo>
      prebuilts/bazel/linux-x86_64/bazel test \
      --platforms=@//build/bazel/platforms:linux_x64 \
     @gfxstream//...
Change-Id: I4db669047f3900392d50509c470ea350d94a64ba
2025-05-14 16:51:19 -07:00
Jason Macnak b001c743d3 Update non interface parts of Gfxstream to use new base lib
NO_IFTTT=existing field covered with type change

Bug: b/403363880

Test: cd hardware/google/gfxstream
      mma

Test: cd hardware/google/gfxstream
      mkdir build && cd build
      cmake .. -G Ninja
      ninja

Test: meson setup \
        -Ddefault_library=static \
        -Dgfxstream-build=host \
        build

      meson compile -C build

Test: cd <emu master dev repo>
      cd external/qemu
      python android/build/python/cmake.py --gfxstream

Test: cd <emu main next repo>
      prebuilts/bazel/linux-x86_64/bazel test \
      --platforms=@//build/bazel/platforms:linux_x64 \
     @gfxstream//...
Change-Id: I6bfb2c4ef8368799d9f99f6293d9762b7dcb4c7f
2025-05-01 16:29:17 +00:00
Jason Macnak 4b4e852b36 Cleanup references to host-common
Bug: b/403363880

Test: cd hardware/google/gfxstream
      mma

Test: cd hardware/google/gfxstream
      mkdir build && cd build
      cmake .. -G Ninja
      ninja

Test: meson setup \
        -Ddefault_library=static \
        -Dgfxstream-build=host \
        build

      meson compile -C build

Test: cd <emu main dev repo>
      cd external/qemu
      python android/build/python/cmake.py --gfxstream

Test: cd <emu main next repo>
      prebuilts/bazel/linux-x86_64/bazel test \
      --platforms=@//build/bazel/platforms:linux_x64 \
     @gfxstream//...
Change-Id: I6765726663c333cd8dbbf3223e8960bec5d224d9
2025-04-28 13:06:02 +00:00
Jason Macnak 93ba0bceef Move window operations from h/g/aemu to h/g/gfxstream
and split type declarations off into render-utils as this is a
part of the RenderLib interface.

Bug: b/403363880

Test: cd hardware/google/gfxstream
      mma

Test: cd hardware/google/gfxstream
      mkdir build && cd build
      cmake .. -G Ninja
      ninja

Test: meson setup \
        -Ddefault_library=static \
        -Dgfxstream-build=host \
        build

      meson compile -C build

Test: cd <emu master dev repo>
      cd external/qemu
      python android/build/python/cmake.py --gfxstream

Test: cd <emu main next repo>
      prebuilts/bazel/linux-x86_64/bazel test \
      --platforms=@//build/bazel/platforms:linux_x64 \
     @gfxstream//...
Change-Id: Ief42a5decdb946b4943388bd40c24bd6ca3a4cba
2025-04-22 21:01:21 +00:00
Jason Macnak a43dfa9f3c Add gfxstream host logging lib
... to eventually replace the existing host-common/logging. This
is needed to break up the circular dependency between aemu-base and
aemu-host-common, so that we can move parts of aemu-base and
aemu-host-common into hardware/google/gfxstream, in order to make
Gfxstream a self contained library for building.

Hooks up the existing host-common/logging via the
RenderLibImpl::setLogger() call.

Bug: b/403363880

Test: cd hardware/google/gfxstream
      mma

Test: cd hardware/google/gfxstream
      mkdir build && cd build
      cmake .. -G Ninja
      ninja

Test: meson setup \
        -Ddefault_library=static \
        -Dgfxstream-build=host \
        build
      meson compile -C build

Test: cd <emu master dev repo>
      cd external/qemu
      python android/build/python/cmake.py --gfxstream

Test: cd <emu main next repo>
      prebuilts/bazel/linux-x86_64/bazel test \
      --platforms=@//build/bazel/platforms:linux_x64 \
     @gfxstream//...

Change-Id: Id52c6f756f85d0a5fb948601228234d7a84a14c2
2025-04-09 13:11:08 -07:00
Serdar Kocdemir 35db18236b Enable warnings as errors on cmake builds
And fix various compilation warnings.

Bug: N/A
Test: rebuild
Change-Id: Ife3489b29b1f2822f69d77ce4305b6b31b19d1cf
2025-03-14 14:01:26 +00:00
Will Hollins 60c7d619fd Do not force tasks to run on main UI thread on new emulator on MAC.
Bug: 393139139

Change-Id: I96a5c95d8af2f0fdf47280005b0756ed3746852c
2025-02-24 12:47:03 -08:00
Jason Macnak 0a7b48ef82 Remove "-Wno-reorder-ctor" and fix warnings
Bug: b/383139165
Test: m
Change-Id: I8b5484f1f9aeb947942da06a4992866dd3bf7d6c
2024-12-09 14:02:20 -08:00
Serdar Kocdemir 3d6cf83caa Replace stderr logging with appropriate logger routines
Usages of fprintf(stderr,..) causes various issues when dealing with
bugs. Replacing them with appropriate versions to ensure they are
collected with any extra information needed and to avoid AS thinking
there were a crash.

Bug: 374311144
Test: build and presubmit
Change-Id: I6893a8df753ddfcc27f28dfd2bd828e53f3f32b3
2024-10-25 08:36:03 +00:00
Joshua Duong caa577d4ac Fix background dimming bug.
We accidentally skipped the HWC2_COMPOSITION_SOLID_COLOR layer because
we saw an invalid colorbuffer handle. But HWC2_COMPOSITION_SOLID_COLOR
should not have a colorbuffer backing.

Bug: 315308358
Bug: 289117017
Test: Open App Info for any app, click "Force stop". There should be a
background dimming effect under the confirmation dialog. WIP integration
test.

Change-Id: Iddf65f26602c51f8bea95cdce37f38139b99f4c7
2023-12-09 07:49:34 -08:00
Jason Macnak 648a9edc06 Rename stream-servers to host
Bug: b/271464937
Test: m
Change-Id: I89553dfe2e27170e1e968e234b364f13e76b2f88
2023-05-19 15:09:46 -07:00