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

Unified Diff: cc/test/layer_tree_test_common.h

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: cc/test/layer_tree_test_common.h
diff --git a/cc/test/layer_tree_test_common.h b/cc/test/layer_tree_test_common.h
index 682edecc69923c2873e5467e3718a376b8f51406..75a40dc178041bf083e9becd9b95fe98e6a4c004 100644
--- a/cc/test/layer_tree_test_common.h
+++ b/cc/test/layer_tree_test_common.h
@@ -6,13 +6,19 @@
#define CC_TEST_LAYER_TREE_TEST_COMMON_H_
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/threading/thread.h"
#include "cc/layer_tree_host.h"
#include "cc/layer_tree_host_impl.h"
+#include "cc/test/fake_layer_tree_host_client.h"
#include "cc/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationDelegate.h"
+namespace Webkit {
+class WebGraphicsContext3D;
+}
+
namespace cc {
class LayerImpl;
class LayerTreeHost;
@@ -22,6 +28,9 @@ class LayerTreeHostImpl;
// Used by test stubs to notify the test when something interesting happens.
class TestHooks : public WebKit::WebAnimationDelegate {
public:
+ TestHooks();
+ virtual ~TestHooks();
+
virtual void beginCommitOnThread(LayerTreeHostImpl*) { }
virtual void commitCompleteOnThread(LayerTreeHostImpl*) { }
virtual bool prepareToDrawOnThread(
@@ -33,6 +42,7 @@ public:
virtual void animate(base::TimeTicks monotonicTime) { }
virtual void layout() { }
virtual void didRecreateOutputSurface(bool succeeded) { }
+ virtual void willRetryRecreateOutputSurface() { }
virtual void didAddAnimation() { }
virtual void didCommit() { }
virtual void didCommitAndDrawFrame() { }
@@ -45,6 +55,13 @@ public:
virtual void notifyAnimationFinished(double time) OVERRIDE { }
virtual scoped_ptr<OutputSurface> createOutputSurface();
+ virtual WebKit::WebGraphicsContext3D* createOrGetOffscreenContext3dForMainThread();
+ virtual WebKit::WebGraphicsContext3D* createOrGetOffscreenContext3dForCompositorThread();
+ virtual GrContext* createOrGetOffscreenGrContextForMainThread();
+ virtual GrContext* createOrGetOffscreenGrContextForCompositorThread();
+
+private:
+ FakeLayerImplTreeHostClient m_fakeClient;
};
class TimeoutTask;

Powered by Google App Engine
This is Rietveld 408576698