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

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

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CONTEXT_PROVIDER_H_ 5 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_
6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_ 6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
17 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
18 #include "cc/output/context_provider.h" 18 #include "cc/output/context_provider.h"
19 #include "cc/test/test_context_support.h" 19 #include "cc/test/test_context_support.h"
20 #include "gpu/command_buffer/client/gles2_interface_stub.h" 20 #include "gpu/command_buffer/client/gles2_interface_stub.h"
21 #include "skia/ext/refptr.h" 21 #include "third_party/skia/include/core/SkRefCnt.h"
22 22
23 namespace cc { 23 namespace cc {
24 class TestWebGraphicsContext3D; 24 class TestWebGraphicsContext3D;
25 class TestGLES2Interface; 25 class TestGLES2Interface;
26 26
27 class TestContextProvider : public ContextProvider { 27 class TestContextProvider : public ContextProvider {
28 public: 28 public:
29 typedef base::Callback<std::unique_ptr<TestWebGraphicsContext3D>(void)> 29 typedef base::Callback<std::unique_ptr<TestWebGraphicsContext3D>(void)>
30 CreateCallback; 30 CreateCallback;
31 31
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 std::unique_ptr<TestWebGraphicsContext3D> context3d_; 73 std::unique_ptr<TestWebGraphicsContext3D> context3d_;
74 std::unique_ptr<TestGLES2Interface> context_gl_; 74 std::unique_ptr<TestGLES2Interface> context_gl_;
75 bool bound_; 75 bool bound_;
76 76
77 base::ThreadChecker main_thread_checker_; 77 base::ThreadChecker main_thread_checker_;
78 base::ThreadChecker context_thread_checker_; 78 base::ThreadChecker context_thread_checker_;
79 79
80 base::Lock context_lock_; 80 base::Lock context_lock_;
81 81
82 LostContextCallback lost_context_callback_; 82 LostContextCallback lost_context_callback_;
83 skia::RefPtr<class GrContext> gr_context_; 83 sk_sp<class GrContext> gr_context_;
84 84
85 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_; 85 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(TestContextProvider); 87 DISALLOW_COPY_AND_ASSIGN(TestContextProvider);
88 }; 88 };
89 89
90 } // namespace cc 90 } // namespace cc
91 91
92 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_ 92 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_
93 93
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698