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

Side by Side Diff: cc/output/gl_renderer.h

Issue 2034583002: Initialize the Display's renderer when the Display is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@displaytest
Patch Set: displayinit: . Created 4 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
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/gl_renderer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_OUTPUT_GL_RENDERER_H_ 5 #ifndef CC_OUTPUT_GL_RENDERER_H_
6 #define CC_OUTPUT_GL_RENDERER_H_ 6 #define CC_OUTPUT_GL_RENDERER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class TextureMailboxDeleter; 42 class TextureMailboxDeleter;
43 class StaticGeometryBinding; 43 class StaticGeometryBinding;
44 class DynamicGeometryBinding; 44 class DynamicGeometryBinding;
45 class ScopedEnsureFramebufferAllocation; 45 class ScopedEnsureFramebufferAllocation;
46 46
47 // Class that handles drawing of composited render layers using GL. 47 // Class that handles drawing of composited render layers using GL.
48 class CC_EXPORT GLRenderer : public DirectRenderer { 48 class CC_EXPORT GLRenderer : public DirectRenderer {
49 public: 49 public:
50 class ScopedUseGrContext; 50 class ScopedUseGrContext;
51 51
52 static std::unique_ptr<GLRenderer> Create( 52 GLRenderer(RendererClient* client,
53 RendererClient* client, 53 const RendererSettings* settings,
54 const RendererSettings* settings, 54 OutputSurface* output_surface,
55 OutputSurface* output_surface, 55 ResourceProvider* resource_provider,
56 ResourceProvider* resource_provider, 56 TextureMailboxDeleter* texture_mailbox_deleter,
57 TextureMailboxDeleter* texture_mailbox_deleter, 57 int highp_threshold_min);
58 int highp_threshold_min);
59
60 ~GLRenderer() override; 58 ~GLRenderer() override;
61 59
62 const RendererCapabilitiesImpl& Capabilities() const override; 60 const RendererCapabilitiesImpl& Capabilities() const override;
63 61
64 // Waits for rendering to finish. 62 // Waits for rendering to finish.
65 void Finish() override; 63 void Finish() override;
66 64
67 void SwapBuffers(CompositorFrameMetadata metadata) override; 65 void SwapBuffers(CompositorFrameMetadata metadata) override;
68 void SwapBuffersComplete() override; 66 void SwapBuffersComplete() override;
69 67
70 void DidReceiveTextureInUseResponses( 68 void DidReceiveTextureInUseResponses(
71 const gpu::TextureInUseResponses& responses) override; 69 const gpu::TextureInUseResponses& responses) override;
72 70
73 virtual bool IsContextLost(); 71 virtual bool IsContextLost();
74 72
75 protected: 73 protected:
76 GLRenderer(RendererClient* client,
77 const RendererSettings* settings,
78 OutputSurface* output_surface,
79 ResourceProvider* resource_provider,
80 TextureMailboxDeleter* texture_mailbox_deleter,
81 int highp_threshold_min);
82
83 void DidChangeVisibility() override; 74 void DidChangeVisibility() override;
84 75
85 bool IsBackbufferDiscarded() const { return is_backbuffer_discarded_; } 76 bool IsBackbufferDiscarded() const { return is_backbuffer_discarded_; }
86 77
87 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } 78 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; }
88 const StaticGeometryBinding* SharedGeometry() const { 79 const StaticGeometryBinding* SharedGeometry() const {
89 return shared_geometry_.get(); 80 return shared_geometry_.get();
90 } 81 }
91 82
92 void GetFramebufferPixelsAsync(const DrawingFrame* frame, 83 void GetFramebufferPixelsAsync(const DrawingFrame* frame,
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 // overlay resource. This means the GLRenderer needs its own ResourcePool. 522 // overlay resource. This means the GLRenderer needs its own ResourcePool.
532 std::unique_ptr<ResourcePool> overlay_resource_pool_; 523 std::unique_ptr<ResourcePool> overlay_resource_pool_;
533 524
534 BoundGeometry bound_geometry_; 525 BoundGeometry bound_geometry_;
535 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 526 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
536 }; 527 };
537 528
538 } // namespace cc 529 } // namespace cc
539 530
540 #endif // CC_OUTPUT_GL_RENDERER_H_ 531 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698