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

Unified Diff: cc/test/compositor_fake_web_graphics_context_3d.h

Issue 11108020: [cc] Change cc_tests.gyp filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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/test/animation_test_common.cc ('k') | cc/test/fake_graphics_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/compositor_fake_web_graphics_context_3d.h
diff --git a/cc/test/compositor_fake_web_graphics_context_3d.h b/cc/test/compositor_fake_web_graphics_context_3d.h
index 638cbb270ce9b24689d5095baf174ade4f4d1a13..2a709a2c36185c8397c3b29963c3efbb2d4cecf1 100644
--- a/cc/test/compositor_fake_web_graphics_context_3d.h
+++ b/cc/test/compositor_fake_web_graphics_context_3d.h
@@ -1,3 +1,36 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
+// Copyright 2011 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 CompositorFakeWebGraphicsContext3D_h
+#define CompositorFakeWebGraphicsContext3D_h
+
+#include "FakeWebGraphicsContext3D.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebKit {
+
+// Test stub for WebGraphicsContext3D. Returns canned values needed for compositor initialization.
+class CompositorFakeWebGraphicsContext3D : public FakeWebGraphicsContext3D {
+public:
+ static PassOwnPtr<CompositorFakeWebGraphicsContext3D> create(Attributes attrs)
+ {
+ return adoptPtr(new CompositorFakeWebGraphicsContext3D(attrs));
+ }
+
+ virtual bool makeContextCurrent() { return true; }
+ virtual WebGLId createProgram() { return 1; }
+ virtual WebGLId createShader(WGC3Denum) { return 1; }
+ virtual void getShaderiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1; }
+ virtual void getProgramiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1; }
+
+protected:
+ explicit CompositorFakeWebGraphicsContext3D(Attributes attrs)
+ {
+ m_attrs = attrs;
+ }
+};
+
+}
+
+#endif
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/test/fake_graphics_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698