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

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: Florin's nits Created 4 years, 7 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
« no previous file with comments | « cc/test/solid_color_content_layer_client.cc ('k') | cc/test/test_context_provider.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 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 std::unique_ptr<TestWebGraphicsContext3D> context3d_; 71 std::unique_ptr<TestWebGraphicsContext3D> context3d_;
72 std::unique_ptr<TestGLES2Interface> context_gl_; 72 std::unique_ptr<TestGLES2Interface> context_gl_;
73 bool bound_; 73 bool bound_;
74 74
75 base::ThreadChecker main_thread_checker_; 75 base::ThreadChecker main_thread_checker_;
76 base::ThreadChecker context_thread_checker_; 76 base::ThreadChecker context_thread_checker_;
77 77
78 base::Lock context_lock_; 78 base::Lock context_lock_;
79 79
80 LostContextCallback lost_context_callback_; 80 LostContextCallback lost_context_callback_;
81 skia::RefPtr<class GrContext> gr_context_; 81 sk_sp<class GrContext> gr_context_;
82 82
83 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_; 83 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(TestContextProvider); 85 DISALLOW_COPY_AND_ASSIGN(TestContextProvider);
86 }; 86 };
87 87
88 } // namespace cc 88 } // namespace cc
89 89
90 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_ 90 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_
91 91
OLDNEW
« no previous file with comments | « cc/test/solid_color_content_layer_client.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698