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

Side by Side Diff: android_webview/browser/aw_render_thread_context_provider.h

Issue 2850713002: aw: Hook up gpu client tracing (Closed)
Patch Set: Created 3 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 | « no previous file | android_webview/browser/aw_render_thread_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
14 #include "cc/output/context_provider.h" 14 #include "cc/output/context_provider.h"
15 #include "gpu/ipc/in_process_command_buffer.h" 15 #include "gpu/ipc/in_process_command_buffer.h"
16 #include "third_party/skia/include/core/SkRefCnt.h" 16 #include "third_party/skia/include/core/SkRefCnt.h"
17 #include "third_party/skia/include/gpu/GrContext.h" 17 #include "third_party/skia/include/gpu/GrContext.h"
18 18
19 namespace gl { 19 namespace gl {
20 class GLSurface; 20 class GLSurface;
21 } 21 }
22 22
23 namespace gpu { 23 namespace gpu {
24 class GLInProcessContext; 24 class GLInProcessContext;
25 } 25 namespace gles2 {
26 class GLES2TraceImplementation;
27 } // namespace gles2
28 } // namespace gpu
26 29
27 namespace android_webview { 30 namespace android_webview {
28 31
29 class AwRenderThreadContextProvider : public cc::ContextProvider { 32 class AwRenderThreadContextProvider : public cc::ContextProvider {
30 public: 33 public:
31 static scoped_refptr<AwRenderThreadContextProvider> Create( 34 static scoped_refptr<AwRenderThreadContextProvider> Create(
32 scoped_refptr<gl::GLSurface> surface, 35 scoped_refptr<gl::GLSurface> surface,
33 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); 36 scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
34 37
35 // Gives the GL internal format that should be used for calling CopyTexImage2D 38 // Gives the GL internal format that should be used for calling CopyTexImage2D
(...skipping 16 matching lines...) Expand all
52 void InvalidateGrContext(uint32_t state) override; 55 void InvalidateGrContext(uint32_t state) override;
53 base::Lock* GetLock() override; 56 base::Lock* GetLock() override;
54 void SetLostContextCallback( 57 void SetLostContextCallback(
55 const LostContextCallback& lost_context_callback) override; 58 const LostContextCallback& lost_context_callback) override;
56 59
57 void OnLostContext(); 60 void OnLostContext();
58 61
59 base::ThreadChecker main_thread_checker_; 62 base::ThreadChecker main_thread_checker_;
60 63
61 std::unique_ptr<gpu::GLInProcessContext> context_; 64 std::unique_ptr<gpu::GLInProcessContext> context_;
65 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_;
62 sk_sp<class GrContext> gr_context_; 66 sk_sp<class GrContext> gr_context_;
63 std::unique_ptr<cc::ContextCacheController> cache_controller_; 67 std::unique_ptr<cc::ContextCacheController> cache_controller_;
64 68
65 LostContextCallback lost_context_callback_; 69 LostContextCallback lost_context_callback_;
66 70
67 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); 71 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider);
68 }; 72 };
69 73
70 } // namespace android_webview 74 } // namespace android_webview
71 75
72 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ 76 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/aw_render_thread_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698