Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: cc/debug/test_context_provider.h

Issue 50303007: Move test-only stuff from cc/debug/ to cc/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fold cc_test_utils into cc_test_support to fix windows link Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/debug/ordered_texture_map.cc ('k') | cc/debug/test_context_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/test_context_provider.h
diff --git a/cc/debug/test_context_provider.h b/cc/debug/test_context_provider.h
deleted file mode 100644
index ab753102730cbc26a2078b3dd02555a9cffa7278..0000000000000000000000000000000000000000
--- a/cc/debug/test_context_provider.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CC_DEBUG_TEST_CONTEXT_PROVIDER_H_
-#define CC_DEBUG_TEST_CONTEXT_PROVIDER_H_
-
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/synchronization/lock.h"
-#include "base/threading/thread_checker.h"
-#include "cc/base/cc_export.h"
-#include "cc/debug/test_context_support.h"
-#include "cc/output/context_provider.h"
-
-namespace WebKit { class WebGraphicsContext3D; }
-
-namespace cc {
-class TestWebGraphicsContext3D;
-
-class CC_EXPORT TestContextProvider
- : public NON_EXPORTED_BASE(cc::ContextProvider) {
- public:
- typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)>
- CreateCallback;
-
- static scoped_refptr<TestContextProvider> Create();
- static scoped_refptr<TestContextProvider> Create(
- scoped_ptr<TestWebGraphicsContext3D> context);
-
- virtual bool BindToCurrentThread() OVERRIDE;
- virtual Capabilities ContextCapabilities() OVERRIDE;
- virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
- virtual gpu::ContextSupport* ContextSupport() OVERRIDE;
- virtual class GrContext* GrContext() OVERRIDE;
- virtual void VerifyContexts() OVERRIDE;
- virtual bool DestroyedOnMainThread() OVERRIDE;
- virtual void SetLostContextCallback(const LostContextCallback& cb) OVERRIDE;
- virtual void SetSwapBuffersCompleteCallback(
- const SwapBuffersCompleteCallback& cb) OVERRIDE;
- virtual void SetMemoryPolicyChangedCallback(
- const MemoryPolicyChangedCallback& cb) OVERRIDE;
-
- TestWebGraphicsContext3D* TestContext3d();
-
- // This returns the TestWebGraphicsContext3D but is valid to call
- // before the context is bound to a thread. This is needed to set up
- // state on the test context before binding. Don't call
- // makeContextCurrent on the context returned from this method.
- TestWebGraphicsContext3D* UnboundTestContext3d();
-
- void SetMemoryAllocation(const ManagedMemoryPolicy& policy,
- bool discard_backbuffer_when_not_visible);
-
- void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes);
-
- protected:
- TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context);
- virtual ~TestContextProvider();
-
- void OnLostContext();
- void OnSwapBuffersComplete();
-
- TestContextSupport support_;
-
- scoped_ptr<TestWebGraphicsContext3D> context3d_;
- bool bound_;
-
- base::ThreadChecker main_thread_checker_;
- base::ThreadChecker context_thread_checker_;
-
- base::Lock destroyed_lock_;
- bool destroyed_;
-
- LostContextCallback lost_context_callback_;
- SwapBuffersCompleteCallback swap_buffers_complete_callback_;
- MemoryPolicyChangedCallback memory_policy_changed_callback_;
-
- class LostContextCallbackProxy;
- scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_;
-
- class SwapBuffersCompleteCallbackProxy;
- scoped_ptr<SwapBuffersCompleteCallbackProxy>
- swap_buffers_complete_callback_proxy_;
-};
-
-} // namespace cc
-
-#endif // CC_DEBUG_TEST_CONTEXT_PROVIDER_H_
-
« no previous file with comments | « cc/debug/ordered_texture_map.cc ('k') | cc/debug/test_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698