From 64ae265e13ea6f211f8a1201047be69941cf857f Mon Sep 17 00:00:00 2001 From: dcastagna Date: Wed, 18 Feb 2015 19:40:10 -0800 Subject: [PATCH] gpu: Remove gpu_bindings.h inclusion from headers and reduce includes dependencies. BUG= Review URL: https://codereview.chromium.org/932003005 Cr-Commit-Position: refs/heads/master@{#316986} --- gpu/command_buffer/service/gpu_timing.cc | 1 + gpu/command_buffer/service/gpu_timing.h | 8 +++++--- gpu/command_buffer/service/gpu_tracer.cc | 1 + gpu/command_buffer/service/gpu_tracer.h | 1 - gpu/perftests/measurements.cc | 2 ++ gpu/perftests/measurements.h | 4 ++-- gpu/perftests/texture_upload_perftest.cc | 2 ++ 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gpu/command_buffer/service/gpu_timing.cc b/gpu/command_buffer/service/gpu_timing.cc index 8716448a4ad5..9a7d52bad3f3 100644 --- a/gpu/command_buffer/service/gpu_timing.cc +++ b/gpu/command_buffer/service/gpu_timing.cc @@ -5,6 +5,7 @@ #include "gpu/command_buffer/service/gpu_timing.h" #include "base/time/time.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_version_info.h" diff --git a/gpu/command_buffer/service/gpu_timing.h b/gpu/command_buffer/service/gpu_timing.h index 1d9ecf690902..726ac4e5f776 100644 --- a/gpu/command_buffer/service/gpu_timing.h +++ b/gpu/command_buffer/service/gpu_timing.h @@ -8,10 +8,12 @@ #include "base/callback.h" #include "base/memory/scoped_ptr.h" #include "gpu/gpu_export.h" -#include "ui/gl/gl_bindings.h" -namespace gpu { +namespace gfx { +class GLContext; +} +namespace gpu { class GPUTiming; // Class to compute the amount of time it takes to fully @@ -30,7 +32,7 @@ class GPU_EXPORT GPUTimer { int64 GetDeltaElapsed(); private: - GLuint queries_[2]; + unsigned int queries_[2]; int64 offset_ = 0; bool end_requested_ = false; GPUTiming* gpu_timing_; diff --git a/gpu/command_buffer/service/gpu_tracer.cc b/gpu/command_buffer/service/gpu_tracer.cc index 6bedb7f00fc3..cc484dc36f58 100644 --- a/gpu/command_buffer/service/gpu_tracer.cc +++ b/gpu/command_buffer/service/gpu_tracer.cc @@ -12,6 +12,7 @@ #include "base/trace_event/trace_event.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/command_buffer/service/context_group.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_version_info.h" namespace gpu { diff --git a/gpu/command_buffer/service/gpu_tracer.h b/gpu/command_buffer/service/gpu_tracer.h index c8ac9d76b603..7aba61271b2f 100644 --- a/gpu/command_buffer/service/gpu_tracer.h +++ b/gpu/command_buffer/service/gpu_tracer.h @@ -17,7 +17,6 @@ #include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "gpu/command_buffer/service/gpu_timing.h" #include "gpu/gpu_export.h" -#include "ui/gl/gl_bindings.h" namespace gpu { namespace gles2 { diff --git a/gpu/perftests/measurements.cc b/gpu/perftests/measurements.cc index 270e459d55d7..f94d1cb8dcd1 100644 --- a/gpu/perftests/measurements.cc +++ b/gpu/perftests/measurements.cc @@ -4,6 +4,8 @@ #include "gpu/perftests/measurements.h" +#include "base/logging.h" +#include "gpu/command_buffer/service/gpu_timing.h" #include "testing/perf/perf_test.h" namespace gpu { diff --git a/gpu/perftests/measurements.h b/gpu/perftests/measurements.h index 15be4228a9cf..1f72b0028ce6 100644 --- a/gpu/perftests/measurements.h +++ b/gpu/perftests/measurements.h @@ -9,10 +9,10 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" -#include "gpu/command_buffer/service/gpu_timing.h" -#include "ui/gl/gl_bindings.h" namespace gpu { +class GPUTiming; +class GPUTimer; struct Measurement { Measurement(); Measurement(const Measurement& m); diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc index 16dabb751450..18bc5ff5fd68 100644 --- a/gpu/perftests/texture_upload_perftest.cc +++ b/gpu/perftests/texture_upload_perftest.cc @@ -6,8 +6,10 @@ #include #include "base/containers/small_map.h" +#include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "gpu/command_buffer/service/gpu_timing.h" #include "gpu/perftests/measurements.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/size.h" -- 2.11.4.GIT