0

Replace IS_CHROMEOS_ASH with IS_CHROMEOS in c/gpu.

This is part of Lacros sunset. Since Lacros is gone, the two macros
mean the same thing.

Bug: 354842935
Change-Id: I48107425adc52a0c891b3d64efeb9897b1fdaabf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332873
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1430087}
This commit is contained in:
Yuta Hijikata
2025-03-09 21:15:39 -07:00
committed by Chromium LUCI CQ
parent 033bdae6cf
commit 296351da92
3 changed files with 16 additions and 25 deletions

@ -7,14 +7,13 @@
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/gpu/chrome_content_gpu_client.h"
#include "media/media_buildflags.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#if BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#include "chromeos/ash/experiences/arc/mojom/protected_buffer_manager.mojom.h"
#include "chromeos/ash/experiences/arc/mojom/video_decode_accelerator.mojom.h"
#include "chromeos/ash/experiences/arc/mojom/video_decoder.mojom.h"
@ -26,12 +25,12 @@
#include "chromeos/ash/experiences/arc/video_accelerator/gpu_arc_video_protected_buffer_allocator.h"
#include "chromeos/ash/experiences/arc/video_accelerator/protected_buffer_manager.h"
#include "chromeos/ash/experiences/arc/video_accelerator/protected_buffer_manager_proxy.h"
#endif // BUILDFLAG(IS_CHROMEOS_ASH) &&
#endif // BUILDFLAG(IS_CHROMEOS) &&
// BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
namespace {
#if BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
void CreateArcVideoDecodeAccelerator(
ChromeContentGpuClient* client,
const gpu::GpuPreferences& gpu_preferences,
@ -83,7 +82,7 @@ void CreateProtectedBufferManager(
client->GetProtectedBufferManager()),
std::move(receiver));
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH) &&
#endif // BUILDFLAG(IS_CHROMEOS) &&
// BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
} // namespace
@ -93,7 +92,7 @@ void ExposeChromeGpuInterfacesToBrowser(
const gpu::GpuPreferences& gpu_preferences,
const gpu::GpuDriverBugWorkarounds& gpu_workarounds,
mojo::BinderMap* binders) {
#if BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
binders->Add<::arc::mojom::VideoDecodeAccelerator>(
base::BindRepeating(&CreateArcVideoDecodeAccelerator, client,
gpu_preferences, gpu_workarounds),
@ -111,6 +110,6 @@ void ExposeChromeGpuInterfacesToBrowser(
binders->Add<::arc::mojom::ProtectedBufferManager>(
base::BindRepeating(&CreateProtectedBufferManager, client),
base::SingleThreadTaskRunner::GetCurrentDefault());
#endif // BUILDFLAG(IS_CHROMEOS_ASH) &&
#endif // BUILDFLAG(IS_CHROMEOS) &&
// BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
}

@ -14,7 +14,6 @@
#include "base/task/single_thread_task_runner.h"
#include "base/token.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/common/profiler/chrome_thread_group_profiler_client.h"
#include "chrome/common/profiler/chrome_thread_profiler_client.h"
#include "chrome/common/profiler/core_unwinders.h"
@ -29,15 +28,12 @@
#include "media/media_buildflags.h"
#include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chromeos/ash/experiences/arc/video_accelerator/protected_buffer_manager.h"
#include "ui/ozone/public/ozone_platform.h" // nogncheck
#include "ui/ozone/public/surface_factory_ozone.h" // nogncheck
#endif
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/ash/experiences/arc/video_accelerator/protected_buffer_manager.h"
#include "chromeos/components/cdm_factory_daemon/chromeos_cdm_factory.h"
#include "chromeos/components/cdm_factory_daemon/mojom/browser_cdm_factory.mojom.h"
#include "ui/ozone/public/ozone_platform.h" // nogncheck
#include "ui/ozone/public/surface_factory_ozone.h" // nogncheck
#endif // BUILDFLAG(IS_CHROMEOS)
ChromeContentGpuClient::ChromeContentGpuClient() {
@ -53,7 +49,7 @@ ChromeContentGpuClient::ChromeContentGpuClient() {
main_thread_profiler_ =
sampling_profiler::ThreadProfiler::CreateAndStartOnMainThread();
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
protected_buffer_manager_ = new arc::ProtectedBufferManager();
#endif
}
@ -61,15 +57,12 @@ ChromeContentGpuClient::ChromeContentGpuClient() {
ChromeContentGpuClient::~ChromeContentGpuClient() = default;
void ChromeContentGpuClient::GpuServiceInitialized() {
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
ui::OzonePlatform::GetInstance()
->GetSurfaceFactoryOzone()
->SetGetProtectedNativePixmapDelegate(base::BindRepeating(
&arc::ProtectedBufferManager::GetProtectedNativePixmapFor,
base::Unretained(protected_buffer_manager_.get())));
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
content::ChildThread::Get()->BindHostReceiver(
chromeos::ChromeOsCdmFactory::GetBrowserCdmFactoryReceiver());
#endif // BUILDFLAG(IS_CHROMEOS)
@ -142,9 +135,9 @@ void ChromeContentGpuClient::PostCompositorThreadCreated(
&CreateCoreUnwindersFactory)));
}
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
scoped_refptr<arc::ProtectedBufferManager>
ChromeContentGpuClient::GetProtectedBufferManager() {
return protected_buffer_manager_;
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_CHROMEOS)

@ -9,10 +9,9 @@
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "build/chromeos_buildflags.h"
#include "content/public/gpu/content_gpu_client.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
namespace arc {
class ProtectedBufferManager;
} // namespace arc
@ -43,7 +42,7 @@ class ChromeContentGpuClient : public content::ContentGpuClient {
void PostCompositorThreadCreated(
base::SingleThreadTaskRunner* task_runner) override;
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
scoped_refptr<arc::ProtectedBufferManager> GetProtectedBufferManager();
#endif
@ -51,7 +50,7 @@ class ChromeContentGpuClient : public content::ContentGpuClient {
// Used to profile main thread startup.
std::unique_ptr<sampling_profiler::ThreadProfiler> main_thread_profiler_;
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS)
scoped_refptr<arc::ProtectedBufferManager> protected_buffer_manager_;
#endif
};