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

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

Issue 2360963004: aw: Fix FBO restore bug (Closed)
Patch Set: Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SURFACES_INSTANCE_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_
6 #define ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ 6 #define ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 namespace android_webview { 29 namespace android_webview {
30 30
31 class AwGLSurface; 31 class AwGLSurface;
32 class ParentOutputSurface; 32 class ParentOutputSurface;
33 class ScopedAppGLStateRestore; 33 class ScopedAppGLStateRestore;
34 34
35 class SurfacesInstance : public base::RefCounted<SurfacesInstance>, 35 class SurfacesInstance : public base::RefCounted<SurfacesInstance>,
36 public cc::DisplayClient, 36 public cc::DisplayClient,
37 public cc::SurfaceFactoryClient { 37 public cc::SurfaceFactoryClient {
38 public: 38 public:
39 static scoped_refptr<SurfacesInstance> GetOrCreateInstance(); 39 static scoped_refptr<SurfacesInstance> GetOrCreateInstance(
40 int framebuffer_binding_ext);
40 41
41 std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator(); 42 std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator();
42 cc::SurfaceManager* GetSurfaceManager(); 43 cc::SurfaceManager* GetSurfaceManager();
43 void SetBackingFrameBufferObject(int framebuffer_binding_ext); 44 void SetBackingFrameBufferObject(int framebuffer_binding_ext);
44 45
45 void DrawAndSwap(const gfx::Size& viewport, 46 void DrawAndSwap(const gfx::Size& viewport,
46 const gfx::Rect& clip, 47 const gfx::Rect& clip,
47 const gfx::Transform& transform, 48 const gfx::Transform& transform,
48 const gfx::Size& frame_size, 49 const gfx::Size& frame_size,
49 const cc::SurfaceId& child_id, 50 const cc::SurfaceId& child_id,
50 const ScopedAppGLStateRestore& gl_state); 51 const ScopedAppGLStateRestore& gl_state);
51 52
52 void AddChildId(const cc::SurfaceId& child_id); 53 void AddChildId(const cc::SurfaceId& child_id);
53 void RemoveChildId(const cc::SurfaceId& child_id); 54 void RemoveChildId(const cc::SurfaceId& child_id);
54 55
55 private: 56 private:
56 friend class base::RefCounted<SurfacesInstance>; 57 friend class base::RefCounted<SurfacesInstance>;
57 58
58 SurfacesInstance(); 59 explicit SurfacesInstance(int framebuffer_binding_ext);
59 ~SurfacesInstance() override; 60 ~SurfacesInstance() override;
60 61
61 // cc::DisplayClient overrides. 62 // cc::DisplayClient overrides.
62 void DisplayOutputSurfaceLost() override {} 63 void DisplayOutputSurfaceLost() override {}
63 void DisplaySetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {} 64 void DisplaySetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {}
64 65
65 // cc::SurfaceFactoryClient implementation. 66 // cc::SurfaceFactoryClient implementation.
66 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 67 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
67 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 68 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
68 69
(...skipping 12 matching lines...) Expand all
81 82
82 // This is owned by |display_|. 83 // This is owned by |display_|.
83 ParentOutputSurface* output_surface_; 84 ParentOutputSurface* output_surface_;
84 85
85 DISALLOW_COPY_AND_ASSIGN(SurfacesInstance); 86 DISALLOW_COPY_AND_ASSIGN(SurfacesInstance);
86 }; 87 };
87 88
88 } // namespace android_webview 89 } // namespace android_webview
89 90
90 #endif // ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ 91 #endif // ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_
OLDNEW
« no previous file with comments | « android_webview/browser/render_thread_manager.cc ('k') | android_webview/browser/surfaces_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698