diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 21:21:59 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 21:21:59 +0000 |
commit | 5bc29a2dabe01f1e2315bcc287f11db10df4144b (patch) | |
tree | 0c451bebe2c40e867a935b5f52b25a242f5f825c /cc/gl_renderer_unittest.cc | |
parent | 4d8bb1a91681f8e48cc5e6b7ac29f3723eadf0d5 (diff) | |
download | chromium_src-5bc29a2dabe01f1e2315bcc287f11db10df4144b.zip chromium_src-5bc29a2dabe01f1e2315bcc287f11db10df4144b.tar.gz chromium_src-5bc29a2dabe01f1e2315bcc287f11db10df4144b.tar.bz2 |
Revert 165476 - Remove static thread pointers from CC
Might be causing webkit_unit_tests to fail on mac/win
BUG=152904
Review URL: https://codereview.chromium.org/11232051
TBR=jamesr@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/gl_renderer_unittest.cc')
-rw-r--r-- | cc/gl_renderer_unittest.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/gl_renderer_unittest.cc b/cc/gl_renderer_unittest.cc index b2f8fa5..5979a38 100644 --- a/cc/gl_renderer_unittest.cc +++ b/cc/gl_renderer_unittest.cc @@ -9,6 +9,7 @@ #include "cc/prioritized_texture_manager.h" #include "cc/resource_provider.h" #include "cc/settings.h" +#include "cc/single_thread_proxy.h" #include "cc/test/fake_web_compositor_output_surface.h" #include "cc/test/fake_web_graphics_context_3d.h" #include "cc/test/test_common.h" @@ -41,6 +42,9 @@ public: int frameCount() { return m_frame; } void setMemoryAllocation(WebGraphicsMemoryAllocation allocation) { + DCHECK(Proxy::isImplThread()); + // In single threaded mode we expect this callback on main thread. + DebugScopedSetMainThread main; m_memoryAllocationChangedCallback->onMemoryAllocationChanged(allocation); } @@ -72,7 +76,6 @@ public: virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCount++; } virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE { m_memoryAllocationLimitBytes = policy.bytesLimitWhenVisible; } virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE { if (m_lastCallWasSetVisibility) *m_lastCallWasSetVisibility = false; } - virtual bool hasImplThread() const OVERRIDE { return false; } // Methods added for test. int setFullRootLayerDamageCount() const { return m_setFullRootLayerDamageCount; } @@ -87,6 +90,7 @@ public: private: int m_setFullRootLayerDamageCount; bool* m_lastCallWasSetVisibility; + DebugScopedSetImplThread m_implThread; scoped_ptr<LayerImpl> m_rootLayer; RenderPassList m_renderPassesInDrawOrder; RenderPassIdHashMap m_renderPasses; |