Commit 8a9bb7e9 authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Move skia_utils to raster_sources in gpu/command_buffer/common.

R=piman@chromium.org

Bug: 844207
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I5b324498db07afdb342d555982781f922a3e3b94
Reviewed-on: https://chromium-review.googlesource.com/1101458Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567499}
parent 6a6e785e
...@@ -148,7 +148,7 @@ class GrContext* TestInProcessContextProvider::GrContext() { ...@@ -148,7 +148,7 @@ class GrContext* TestInProcessContextProvider::GrContext() {
size_t max_resource_cache_bytes; size_t max_resource_cache_bytes;
size_t max_glyph_cache_texture_bytes; size_t max_glyph_cache_texture_bytes;
gpu::DefaultGrCacheLimitsForTests(&max_resource_cache_bytes, gpu::raster::DefaultGrCacheLimitsForTests(&max_resource_cache_bytes,
&max_glyph_cache_texture_bytes); &max_glyph_cache_texture_bytes);
gr_context_.reset(new skia_bindings::GrContextForGLES2Interface( gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
ContextGL(), ContextSupport(), ContextCapabilities(), ContextGL(), ContextSupport(), ContextCapabilities(),
......
...@@ -102,7 +102,7 @@ class GrContext* VizProcessContextProvider::GrContext() { ...@@ -102,7 +102,7 @@ class GrContext* VizProcessContextProvider::GrContext() {
size_t max_resource_cache_bytes; size_t max_resource_cache_bytes;
size_t max_glyph_cache_texture_bytes; size_t max_glyph_cache_texture_bytes;
gpu::DetermineGrCacheLimitsFromAvailableMemory( gpu::raster::DetermineGrCacheLimitsFromAvailableMemory(
&max_resource_cache_bytes, &max_glyph_cache_texture_bytes); &max_resource_cache_bytes, &max_glyph_cache_texture_bytes);
gr_context_.reset(new skia_bindings::GrContextForGLES2Interface( gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
......
...@@ -257,7 +257,7 @@ class GrContext* TestContextProvider::GrContext() { ...@@ -257,7 +257,7 @@ class GrContext* TestContextProvider::GrContext() {
size_t max_resource_cache_bytes; size_t max_resource_cache_bytes;
size_t max_glyph_cache_texture_bytes; size_t max_glyph_cache_texture_bytes;
gpu::DefaultGrCacheLimitsForTests(&max_resource_cache_bytes, gpu::raster::DefaultGrCacheLimitsForTests(&max_resource_cache_bytes,
&max_glyph_cache_texture_bytes); &max_glyph_cache_texture_bytes);
gr_context_ = std::make_unique<skia_bindings::GrContextForGLES2Interface>( gr_context_ = std::make_unique<skia_bindings::GrContextForGLES2Interface>(
context_gl_.get(), support_.get(), context_gl_->test_capabilities(), context_gl_.get(), support_.get(), context_gl_->test_capabilities(),
......
...@@ -79,8 +79,6 @@ source_set("common_sources") { ...@@ -79,8 +79,6 @@ source_set("common_sources") {
"mailbox_holder.h", "mailbox_holder.h",
"scheduling_priority.cc", "scheduling_priority.cc",
"scheduling_priority.h", "scheduling_priority.h",
"skia_utils.cc",
"skia_utils.h",
"swap_buffers_complete_params.cc", "swap_buffers_complete_params.cc",
"swap_buffers_complete_params.h", "swap_buffers_complete_params.h",
"swap_buffers_flags.h", "swap_buffers_flags.h",
...@@ -139,6 +137,8 @@ source_set("raster_sources") { ...@@ -139,6 +137,8 @@ source_set("raster_sources") {
"raster_cmd_format_autogen.h", "raster_cmd_format_autogen.h",
"raster_cmd_ids.h", "raster_cmd_ids.h",
"raster_cmd_ids_autogen.h", "raster_cmd_ids_autogen.h",
"skia_utils.cc",
"skia_utils.h",
] ]
configs += [ "//gpu:raster_implementation" ] configs += [ "//gpu:raster_implementation" ]
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "build/build_config.h" #include "build/build_config.h"
namespace gpu { namespace gpu {
namespace raster {
void DetermineGrCacheLimitsFromAvailableMemory( void DetermineGrCacheLimitsFromAvailableMemory(
size_t* max_resource_cache_bytes, size_t* max_resource_cache_bytes,
...@@ -49,4 +50,5 @@ void DefaultGrCacheLimitsForTests(size_t* max_resource_cache_bytes, ...@@ -49,4 +50,5 @@ void DefaultGrCacheLimitsForTests(size_t* max_resource_cache_bytes,
*max_glyph_cache_texture_bytes = kDefaultGlyphCacheTextureBytes; *max_glyph_cache_texture_bytes = kDefaultGlyphCacheTextureBytes;
} }
} // namespace raster
} // namespace gpu } // namespace gpu
...@@ -6,18 +6,20 @@ ...@@ -6,18 +6,20 @@
#define GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_ #define GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
#include <memory> #include <memory>
#include "gpu/gpu_export.h" #include "gpu/raster_export.h"
namespace gpu { namespace gpu {
namespace raster {
GPU_EXPORT void DetermineGrCacheLimitsFromAvailableMemory( RASTER_EXPORT void DetermineGrCacheLimitsFromAvailableMemory(
size_t* max_resource_cache_bytes, size_t* max_resource_cache_bytes,
size_t* max_glyph_cache_texture_bytes); size_t* max_glyph_cache_texture_bytes);
GPU_EXPORT void DefaultGrCacheLimitsForTests( RASTER_EXPORT void DefaultGrCacheLimitsForTests(
size_t* max_resource_cache_bytes, size_t* max_resource_cache_bytes,
size_t* max_glyph_cache_texture_bytes); size_t* max_glyph_cache_texture_bytes);
} // namespace raster
} // namespace gpu } // namespace gpu
#endif // GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_ #endif // GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
...@@ -224,6 +224,7 @@ target(link_target_type, "gles2_sources") { ...@@ -224,6 +224,7 @@ target(link_target_type, "gles2_sources") {
configs += [ configs += [
"//build/config:precompiled_headers", "//build/config:precompiled_headers",
"//gpu:gpu_gles2_implementation", "//gpu:gpu_gles2_implementation",
"//gpu:raster_implementation",
"//third_party/khronos:khronos_headers", "//third_party/khronos:khronos_headers",
] ]
......
...@@ -46,6 +46,7 @@ source_set("internal") { ...@@ -46,6 +46,7 @@ source_set("internal") {
"//gpu/command_buffer/client:gles2_cmd_helper", "//gpu/command_buffer/client:gles2_cmd_helper",
"//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/client:gles2_implementation",
"//gpu/command_buffer/client:raster", "//gpu/command_buffer/client:raster",
"//gpu/command_buffer/common:raster",
"//gpu/skia_bindings", "//gpu/skia_bindings",
"//mojo/public/cpp/system", "//mojo/public/cpp/system",
"//services/service_manager/public/cpp", "//services/service_manager/public/cpp",
......
...@@ -439,7 +439,7 @@ class GrContext* ContextProviderCommandBuffer::GrContext() { ...@@ -439,7 +439,7 @@ class GrContext* ContextProviderCommandBuffer::GrContext() {
size_t max_resource_cache_bytes; size_t max_resource_cache_bytes;
size_t max_glyph_cache_texture_bytes; size_t max_glyph_cache_texture_bytes;
gpu::DetermineGrCacheLimitsFromAvailableMemory( gpu::raster::DetermineGrCacheLimitsFromAvailableMemory(
&max_resource_cache_bytes, &max_glyph_cache_texture_bytes); &max_resource_cache_bytes, &max_glyph_cache_texture_bytes);
gpu::gles2::GLES2Interface* gl_interface; gpu::gles2::GLES2Interface* gl_interface;
......
...@@ -159,7 +159,7 @@ class GrContext* InProcessContextProvider::GrContext() { ...@@ -159,7 +159,7 @@ class GrContext* InProcessContextProvider::GrContext() {
size_t max_resource_cache_bytes; size_t max_resource_cache_bytes;
size_t max_glyph_cache_texture_bytes; size_t max_glyph_cache_texture_bytes;
gpu::DefaultGrCacheLimitsForTests(&max_resource_cache_bytes, gpu::raster::DefaultGrCacheLimitsForTests(&max_resource_cache_bytes,
&max_glyph_cache_texture_bytes); &max_glyph_cache_texture_bytes);
gr_context_.reset(new skia_bindings::GrContextForGLES2Interface( gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
ContextGL(), ContextSupport(), ContextCapabilities(), ContextGL(), ContextSupport(), ContextCapabilities(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment