Skip to content

Commit

Permalink
Renames shader cache files, includes, and builds.
Browse files Browse the repository at this point in the history
- Renames for files done in this CL to make the child CL's diff
  easier to read.

Bug: dawn:549
Change-Id: I86ce788de11fcf8890d5f9988098ac6c8a3ec153
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3788703
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Cr-Commit-Position: refs/heads/main@{#1031738}
  • Loading branch information
lokokung authored and Chromium LUCI CQ committed Aug 5, 2022
1 parent a396d38 commit 309bb10
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion components/viz/host/gpu_host_impl.cc
Expand Up @@ -23,7 +23,7 @@
#include "gpu/config/gpu_finch_features.h"
#include "gpu/config/gpu_info.h"
#include "gpu/ipc/common/gpu_client_ids.h"
#include "gpu/ipc/host/shader_disk_cache.h"
#include "gpu/ipc/host/gpu_disk_cache.h"
#include "mojo/public/cpp/bindings/sync_call_restrictions.h"
#include "ui/gfx/font_render_params.h"

Expand Down
4 changes: 2 additions & 2 deletions content/browser/BUILD.gn
Expand Up @@ -972,6 +972,8 @@ source_set("browser") {
"gpu/gpu_data_manager_impl.h",
"gpu/gpu_data_manager_impl_private.cc",
"gpu/gpu_data_manager_impl_private.h",
"gpu/gpu_disk_cache_factory.cc",
"gpu/gpu_disk_cache_factory.h",
"gpu/gpu_feature_checker_impl.cc",
"gpu/gpu_feature_checker_impl.h",
"gpu/gpu_internals_ui.cc",
Expand All @@ -985,8 +987,6 @@ source_set("browser") {
"gpu/gpu_process_host_receiver_bindings.cc",
"gpu/peak_gpu_memory_tracker_impl.cc",
"gpu/peak_gpu_memory_tracker_impl.h",
"gpu/shader_cache_factory.cc",
"gpu/shader_cache_factory.h",
"handwriting/handwriting_recognition_service_factory.cc",
"handwriting/handwriting_recognition_service_factory.h",
"handwriting/handwriting_recognition_service_impl.cc",
Expand Down
2 changes: 1 addition & 1 deletion content/browser/browser_main_loop.cc
Expand Up @@ -72,8 +72,8 @@
#include "content/browser/gpu/browser_gpu_client_delegate.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_disk_cache_factory.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/browser/media/media_internals.h"
#include "content/browser/media/media_keys_listener_manager_impl.h"
#include "content/browser/metrics/histogram_synchronizer.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/gpu/browser_gpu_channel_host_factory.cc
Expand Up @@ -24,9 +24,9 @@
#include "components/viz/common/features.h"
#include "components/viz/host/gpu_host_impl.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_disk_cache_factory.h"
#include "content/browser/gpu/gpu_memory_buffer_manager_singleton.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/common/child_process_host_impl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/gpu/gpu_data_manager_impl_private.cc
Expand Up @@ -64,8 +64,8 @@
#include "gpu/config/gpu_util.h"
#include "gpu/config/software_rendering_list_autogen.h"
#include "gpu/ipc/common/memory_stats.h"
#include "gpu/ipc/host/gpu_disk_cache.h"
#include "gpu/ipc/host/gpu_memory_buffer_support.h"
#include "gpu/ipc/host/shader_disk_cache.h"
#include "gpu/vulkan/buildflags.h"
#include "media/gpu/gpu_video_accelerator_util.h"
#include "media/media_buildflags.h"
Expand Down
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/gpu/shader_cache_factory.h"
#include "content/browser/gpu/gpu_disk_cache_factory.h"

#include "gpu/ipc/host/shader_disk_cache.h"
#include "gpu/ipc/host/gpu_disk_cache.h"

namespace content {

Expand Down
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_BROWSER_GPU_SHADER_CACHE_FACTORY_H_
#define CONTENT_BROWSER_GPU_SHADER_CACHE_FACTORY_H_
#ifndef CONTENT_BROWSER_GPU_GPU_DISK_CACHE_FACTORY_H_
#define CONTENT_BROWSER_GPU_GPU_DISK_CACHE_FACTORY_H_

#include "content/common/content_export.h"
#include "gpu/ipc/host/shader_disk_cache.h"
#include "gpu/ipc/host/gpu_disk_cache.h"

namespace content {

Expand All @@ -19,4 +19,4 @@ CONTENT_EXPORT gpu::ShaderCacheFactory* GetShaderCacheFactorySingleton();

} // namespace content

#endif // CONTENT_BROWSER_GPU_SHADER_CACHE_FACTORY_H_
#endif // CONTENT_BROWSER_GPU_GPU_DISK_CACHE_FACTORY_H_
4 changes: 2 additions & 2 deletions content/browser/gpu/gpu_process_host.cc
Expand Up @@ -39,9 +39,9 @@
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_disk_cache_factory.h"
#include "content/browser/gpu/gpu_main_thread_factory.h"
#include "content/browser/gpu/gpu_memory_buffer_manager_singleton.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/common/child_process.mojom.h"
#include "content/common/child_process_host_impl.h"
#include "content/common/in_process_child_thread_params.h"
Expand All @@ -65,7 +65,7 @@
#include "gpu/config/gpu_switches.h"
#include "gpu/ipc/common/gpu_client_ids.h"
#include "gpu/ipc/common/result_codes.h"
#include "gpu/ipc/host/shader_disk_cache.h"
#include "gpu/ipc/host/gpu_disk_cache.h"
#include "media/base/media_switches.h"
#include "media/media_buildflags.h"
#include "mojo/public/cpp/bindings/generic_pending_receiver.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/renderer_host/render_process_host_impl.cc
Expand Up @@ -94,7 +94,7 @@
#include "content/browser/gpu/browser_gpu_client_delegate.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/browser/gpu/gpu_disk_cache_factory.h"
#include "content/browser/locks/lock_manager.h"
#include "content/browser/media/frameless_media_interface_proxy.h"
#include "content/browser/media/media_internals.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/storage_partition_impl.cc
Expand Up @@ -67,7 +67,7 @@
#include "content/browser/file_system/browser_file_system_helper.h"
#include "content/browser/file_system_access/file_system_access_manager_impl.h"
#include "content/browser/font_access/font_access_manager.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/browser/gpu/gpu_disk_cache_factory.h"
#include "content/browser/host_zoom_level_context.h"
#include "content/browser/indexed_db/indexed_db_control_wrapper.h"
#include "content/browser/interest_group/interest_group_manager_impl.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/storage_partition_impl_unittest.cc
Expand Up @@ -54,7 +54,7 @@
#include "content/browser/attribution_reporting/attribution_trigger.h"
#include "content/browser/code_cache/generated_code_cache.h"
#include "content/browser/code_cache/generated_code_cache_context.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/browser/gpu/gpu_disk_cache_factory.h"
#include "content/browser/interest_group/interest_group_manager_impl.h"
#include "content/browser/interest_group/interest_group_permissions_cache.h"
#include "content/browser/interest_group/interest_group_permissions_checker.h"
Expand Down
2 changes: 1 addition & 1 deletion gpu/BUILD.gn
Expand Up @@ -589,7 +589,7 @@ test("gpu_unittests") {
"ipc/common/gpu_memory_buffer_impl_shared_memory_unittest.cc",
"ipc/common/gpu_memory_buffer_impl_test_template.h",
"ipc/common/mojom_traits_unittest.cc",
"ipc/host/shader_disk_cache_unittest.cc",
"ipc/host/gpu_disk_cache_unittest.cc",
"ipc/service/gpu_channel_manager_unittest.cc",
"ipc/service/gpu_channel_test_common.cc",
"ipc/service/gpu_channel_test_common.h",
Expand Down
4 changes: 2 additions & 2 deletions gpu/ipc/host/BUILD.gn
Expand Up @@ -6,10 +6,10 @@ import("//build/config/ui.gni")

source_set("host") {
sources = [
"gpu_disk_cache.cc",
"gpu_disk_cache.h",
"gpu_memory_buffer_support.cc",
"gpu_memory_buffer_support.h",
"shader_disk_cache.cc",
"shader_disk_cache.h",
]

deps = [
Expand Down
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gpu/ipc/host/shader_disk_cache.h"
#include "gpu/ipc/host/gpu_disk_cache.h"

#include "base/bind.h"
#include "base/command_line.h"
Expand Down
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef GPU_IPC_HOST_SHADER_DISK_CACHE_H_
#define GPU_IPC_HOST_SHADER_DISK_CACHE_H_
#ifndef GPU_IPC_HOST_GPU_DISK_CACHE_H_
#define GPU_IPC_HOST_GPU_DISK_CACHE_H_

#include <stdint.h>

Expand Down Expand Up @@ -166,4 +166,4 @@ class ShaderCacheFactory : public base::ThreadChecker {

} // namespace gpu

#endif // GPU_IPC_HOST_SHADER_DISK_CACHE_H_
#endif // GPU_IPC_HOST_GPU_DISK_CACHE_H_
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gpu/ipc/host/shader_disk_cache.h"
#include "gpu/ipc/host/gpu_disk_cache.h"

#include "base/files/scoped_temp_dir.h"
#include "base/test/bind.h"
Expand Down Expand Up @@ -84,16 +84,18 @@ TEST_F(ShaderDiskCacheTest, ClearByPathTriggersCallback) {
InitCache();
factory()->Get(kDefaultClientId)->Cache(kCacheKey, kCacheValue);
net::TestCompletionCallback test_callback;
factory()->ClearByPath(cache_path(), base::Time(), base::Time::Max(),
base::BindLambdaForTesting([&]() { test_callback.callback().Run(1); } ));
factory()->ClearByPath(
cache_path(), base::Time(), base::Time::Max(),
base::BindLambdaForTesting([&]() { test_callback.callback().Run(1); }));
ASSERT_TRUE(test_callback.WaitForResult());
}

// Important for clearing in-memory profiles.
TEST_F(ShaderDiskCacheTest, ClearByPathWithEmptyPathTriggersCallback) {
net::TestCompletionCallback test_callback;
factory()->ClearByPath(base::FilePath(), base::Time(), base::Time::Max(),
base::BindLambdaForTesting([&]() { test_callback.callback().Run(1); } ));
factory()->ClearByPath(
base::FilePath(), base::Time(), base::Time::Max(),
base::BindLambdaForTesting([&]() { test_callback.callback().Run(1); }));
ASSERT_TRUE(test_callback.WaitForResult());
}

Expand Down

0 comments on commit 309bb10

Please sign in to comment.