From ec05af504dcd00ae27e30741730383a173411ab6 Mon Sep 17 00:00:00 2001 From: "piman@chromium.org" Date: Wed, 21 Nov 2012 23:07:00 +0000 Subject: ui/compositor: use cc/ directly instead of webkit BUG=159278 Review URL: https://chromiumcodereview.appspot.com/11415089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169152 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/active_animation.h | 2 +- cc/cc.gyp | 6 ++++++ cc/layer.h | 4 ++-- cc/layer_tiling_data.h | 2 +- cc/proxy.h | 12 ++++++++---- 5 files changed, 18 insertions(+), 8 deletions(-) (limited to 'cc') diff --git a/cc/active_animation.h b/cc/active_animation.h index be195bd..413e9f2 100644 --- a/cc/active_animation.h +++ b/cc/active_animation.h @@ -66,7 +66,7 @@ public: double startTime() const { return m_startTime; } void setStartTime(double monotonicTime) { m_startTime = monotonicTime; } - bool hasSetStartTime() const { return m_startTime; } + bool hasSetStartTime() const { return !!m_startTime; } double timeOffset() const { return m_timeOffset; } void setTimeOffset(double monotonicTime) { m_timeOffset = monotonicTime; } diff --git a/cc/cc.gyp b/cc/cc.gyp index 071b207..9be74de 100644 --- a/cc/cc.gyp +++ b/cc/cc.gyp @@ -280,6 +280,12 @@ 'sources': [ '<@(cc_source_files)', ], + 'direct_dependent_settings': { + 'include_dirs': [ + # Needed for in layer.h + '<(webkit_src_dir)/Source/Platform/chromium', + ], + } }, ], } diff --git a/cc/layer.h b/cc/layer.h index 1548880..ef75286 100644 --- a/cc/layer.h +++ b/cc/layer.h @@ -188,8 +188,8 @@ public: Layer* replicaLayer() { return m_replicaLayer.get(); } const Layer* replicaLayer() const { return m_replicaLayer.get(); } - bool hasMask() const { return m_maskLayer; } - bool hasReplica() const { return m_replicaLayer; } + bool hasMask() const { return !!m_maskLayer; } + bool hasReplica() const { return !!m_replicaLayer; } bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_replicaLayer->m_maskLayer); } // These methods typically need to be overwritten by derived classes. diff --git a/cc/layer_tiling_data.h b/cc/layer_tiling_data.h index 07d3c40..a1d990a 100644 --- a/cc/layer_tiling_data.h +++ b/cc/layer_tiling_data.h @@ -36,7 +36,7 @@ public: gfx::Size tileSize() const; // Change the border texel setting. This may invalidate all existing tiles. void setBorderTexelOption(BorderTexelOption); - bool hasBorderTexels() const { return m_tilingData.border_texels(); } + bool hasBorderTexels() const { return !!m_tilingData.border_texels(); } bool isEmpty() const { return hasEmptyBounds() || !tiles().size(); } diff --git a/cc/proxy.h b/cc/proxy.h index d9d5bd3..65680e3 100644 --- a/cc/proxy.h +++ b/cc/proxy.h @@ -117,26 +117,30 @@ private: #endif }; +#ifndef NDEBUG class DebugScopedSetMainThreadBlocked { public: explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) : m_proxy(proxy) { -#ifndef NDEBUG DCHECK(!m_proxy->isMainThreadBlocked()); m_proxy->setMainThreadBlocked(true); -#endif } ~DebugScopedSetMainThreadBlocked() { -#ifndef NDEBUG DCHECK(m_proxy->isMainThreadBlocked()); m_proxy->setMainThreadBlocked(false); -#endif } private: Proxy* m_proxy; }; +#else +class DebugScopedSetMainThreadBlocked { +public: + explicit DebugScopedSetMainThreadBlocked(Proxy*) { } + ~DebugScopedSetMainThreadBlocked() { } +}; +#endif } -- cgit v1.1