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

Side by Side Diff: cc/test/test_web_graphics_context_3d.h

Issue 21026005: aura: Remove CreateOffscreenContext from ui::ContextFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offscreencontext: clang-format Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 5 #ifndef CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
6 #define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 6 #define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h"
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/stl_util.h" 16 #include "base/stl_util.h"
16 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
17 #include "cc/base/scoped_ptr_hash_map.h" 18 #include "cc/base/scoped_ptr_hash_map.h"
18 #include "cc/debug/fake_web_graphics_context_3d.h" 19 #include "cc/debug/fake_web_graphics_context_3d.h"
19 #include "third_party/khronos/GLES2/gl2.h" 20 #include "third_party/khronos/GLES2/gl2.h"
20 21
21 namespace WebKit { struct WebGraphicsMemoryAllocation; } 22 namespace WebKit {
23 class WebGraphicsContext3D;
24 struct WebGraphicsMemoryAllocation;
25 }
22 26
23 namespace cc { 27 namespace cc {
24 28
25 class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D { 29 class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
26 public: 30 public:
27 static scoped_ptr<TestWebGraphicsContext3D> Create() { 31 static scoped_ptr<TestWebGraphicsContext3D> Create();
28 return make_scoped_ptr(new TestWebGraphicsContext3D()); 32 static base::Callback<
29 } 33 scoped_ptr<TestWebGraphicsContext3D>()> CreateFactory();
30 static scoped_ptr<TestWebGraphicsContext3D> Create( 34 static base::Callback<
31 const WebKit::WebGraphicsContext3D::Attributes& attributes) { 35 scoped_ptr<WebKit::WebGraphicsContext3D>()> CreateBaseFactory();
32 return make_scoped_ptr(new TestWebGraphicsContext3D(attributes)); 36
33 }
34 virtual ~TestWebGraphicsContext3D(); 37 virtual ~TestWebGraphicsContext3D();
35 38
36 virtual bool makeContextCurrent(); 39 virtual bool makeContextCurrent();
37 40
38 virtual int width(); 41 virtual int width();
39 virtual int height(); 42 virtual int height();
40 43
41 virtual void reshapeWithScaleFactor( 44 virtual void reshapeWithScaleFactor(
42 int width, int height, float scale_factor); 45 int width, int height, float scale_factor);
43 46
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 288
286 scoped_refptr<Namespace> namespace_; 289 scoped_refptr<Namespace> namespace_;
287 static Namespace* shared_namespace_; 290 static Namespace* shared_namespace_;
288 291
289 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; 292 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
290 }; 293 };
291 294
292 } // namespace cc 295 } // namespace cc
293 296
294 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 297 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698