OLD | NEW |
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 "base/cancelable_callback.h" | 8 #include "base/cancelable_callback.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/base/scoped_ptr_vector.h" | 10 #include "cc/base/scoped_ptr_vector.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 class ScopedResource; | 33 class ScopedResource; |
34 class StreamVideoDrawQuad; | 34 class StreamVideoDrawQuad; |
35 class TextureDrawQuad; | 35 class TextureDrawQuad; |
36 class GeometryBinding; | 36 class GeometryBinding; |
37 class ScopedEnsureFramebufferAllocation; | 37 class ScopedEnsureFramebufferAllocation; |
38 | 38 |
39 // Class that handles drawing of composited render layers using GL. | 39 // Class that handles drawing of composited render layers using GL. |
40 class CC_EXPORT GLRenderer : public DirectRenderer { | 40 class CC_EXPORT GLRenderer : public DirectRenderer { |
41 public: | 41 public: |
42 static scoped_ptr<GLRenderer> Create(RendererClient* client, | 42 static scoped_ptr<GLRenderer> Create(RendererClient* client, |
| 43 const LayerTreeSettings* settings, |
43 OutputSurface* output_surface, | 44 OutputSurface* output_surface, |
44 ResourceProvider* resource_provider, | 45 ResourceProvider* resource_provider, |
45 int highp_threshold_min, | 46 int highp_threshold_min, |
46 bool use_skia_gpu_backend); | 47 bool use_skia_gpu_backend); |
47 | 48 |
48 virtual ~GLRenderer(); | 49 virtual ~GLRenderer(); |
49 | 50 |
50 virtual const RendererCapabilities& Capabilities() const OVERRIDE; | 51 virtual const RendererCapabilities& Capabilities() const OVERRIDE; |
51 | 52 |
52 WebKit::WebGraphicsContext3D* Context(); | 53 WebKit::WebGraphicsContext3D* Context(); |
(...skipping 21 matching lines...) Expand all Loading... |
74 static void DebugGLCall(WebKit::WebGraphicsContext3D* context, | 75 static void DebugGLCall(WebKit::WebGraphicsContext3D* context, |
75 const char* command, | 76 const char* command, |
76 const char* file, | 77 const char* file, |
77 int line); | 78 int line); |
78 | 79 |
79 bool CanUseSkiaGPUBackend() const; | 80 bool CanUseSkiaGPUBackend() const; |
80 void LazyLabelOffscreenContext(ContextProvider* offscreen_context_provider); | 81 void LazyLabelOffscreenContext(ContextProvider* offscreen_context_provider); |
81 | 82 |
82 protected: | 83 protected: |
83 GLRenderer(RendererClient* client, | 84 GLRenderer(RendererClient* client, |
| 85 const LayerTreeSettings* settings, |
84 OutputSurface* output_surface, | 86 OutputSurface* output_surface, |
85 ResourceProvider* resource_provider, | 87 ResourceProvider* resource_provider, |
86 int highp_threshold_min); | 88 int highp_threshold_min); |
87 | 89 |
88 bool IsBackbufferDiscarded() const { return is_backbuffer_discarded_; } | 90 bool IsBackbufferDiscarded() const { return is_backbuffer_discarded_; } |
89 bool Initialize(); | 91 bool Initialize(); |
90 void InitializeGrContext(); | 92 void InitializeGrContext(); |
91 | 93 |
92 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } | 94 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } |
93 const GeometryBinding* SharedGeometry() const { | 95 const GeometryBinding* SharedGeometry() const { |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 462 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
461 #define GLC(context, x) \ | 463 #define GLC(context, x) \ |
462 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 464 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
463 #else | 465 #else |
464 #define GLC(context, x) (x) | 466 #define GLC(context, x) (x) |
465 #endif | 467 #endif |
466 | 468 |
467 } // namespace cc | 469 } // namespace cc |
468 | 470 |
469 #endif // CC_OUTPUT_GL_RENDERER_H_ | 471 #endif // CC_OUTPUT_GL_RENDERER_H_ |
OLD | NEW |