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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/layers/tiled_layer_unittest.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 "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_deque.h" 10 #include "cc/base/scoped_ptr_deque.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void FinishDrawingFrame(DrawingFrame* frame) override; 117 void FinishDrawingFrame(DrawingFrame* frame) override;
118 bool FlippedFramebuffer(const DrawingFrame* frame) const override; 118 bool FlippedFramebuffer(const DrawingFrame* frame) const override;
119 bool FlippedRootFramebuffer() const; 119 bool FlippedRootFramebuffer() const;
120 void EnsureScissorTestEnabled() override; 120 void EnsureScissorTestEnabled() override;
121 void EnsureScissorTestDisabled() override; 121 void EnsureScissorTestDisabled() override;
122 void CopyCurrentRenderPassToBitmap( 122 void CopyCurrentRenderPassToBitmap(
123 DrawingFrame* frame, 123 DrawingFrame* frame,
124 scoped_ptr<CopyOutputRequest> request) override; 124 scoped_ptr<CopyOutputRequest> request) override;
125 void FinishDrawingQuadList() override; 125 void FinishDrawingQuadList() override;
126 126
127 // Check if quad needs antialiasing and if so, inflate the quad and
128 // fill edge array for fragment shader. local_quad is set to
129 // inflated quad if antialiasing is required, otherwise it is left
130 // unchanged. edge array is filled with inflated quad's edge data
131 // if antialiasing is required, otherwise it is left unchanged.
132 // Returns true if quad requires antialiasing and false otherwise. 127 // Returns true if quad requires antialiasing and false otherwise.
133 static bool SetupQuadForAntialiasing(const gfx::Transform& device_transform, 128 static bool ShouldAntialiasQuad(const gfx::Transform& device_transform,
129 const DrawQuad* quad,
130 bool force_antialiasing);
131
132 // Inflate the quad and fill edge array for fragment shader.
133 // |local_quad| is set to inflated quad. |edge| array is filled with
134 // inflated quad's edge data.
135 static void SetupQuadForAntialiasing(const gfx::Transform& device_transform,
134 const DrawQuad* quad, 136 const DrawQuad* quad,
135 gfx::QuadF* local_quad, 137 gfx::QuadF* local_quad,
136 float edge[24]); 138 float edge[24]);
137 139
138 private: 140 private:
139 friend class GLRendererShaderPixelTest; 141 friend class GLRendererShaderPixelTest;
140 friend class GLRendererShaderTest; 142 friend class GLRendererShaderTest;
141 143
142 static void ToGLMatrix(float* gl_matrix, const gfx::Transform& transform); 144 static void ToGLMatrix(float* gl_matrix, const gfx::Transform& transform);
143 145
(...skipping 17 matching lines...) Expand all
161 163
162 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame, 164 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame,
163 const RenderPassDrawQuad* quad); 165 const RenderPassDrawQuad* quad);
164 skia::RefPtr<SkImage> ApplyBackgroundFilters( 166 skia::RefPtr<SkImage> ApplyBackgroundFilters(
165 DrawingFrame* frame, 167 DrawingFrame* frame,
166 const RenderPassDrawQuad* quad, 168 const RenderPassDrawQuad* quad,
167 ScopedResource* background_texture); 169 ScopedResource* background_texture);
168 scoped_ptr<ScopedResource> ApplyInverseTransformForBackgroundFilters( 170 scoped_ptr<ScopedResource> ApplyInverseTransformForBackgroundFilters(
169 DrawingFrame* frame, 171 DrawingFrame* frame,
170 const RenderPassDrawQuad* quad, 172 const RenderPassDrawQuad* quad,
171 const gfx::Transform& contents_device_transform_inverse, 173 const gfx::Transform& contents_device_transform,
172 skia::RefPtr<SkImage> backdrop_bitmap, 174 skia::RefPtr<SkImage> backdrop_bitmap,
173 const gfx::Rect& backdrop_bounding_rect); 175 const gfx::Rect& backdrop_bounding_rect);
174 176
175 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); 177 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad);
176 void DrawSolidColorQuad(const DrawingFrame* frame, 178 void DrawSolidColorQuad(const DrawingFrame* frame,
177 const SolidColorDrawQuad* quad); 179 const SolidColorDrawQuad* quad);
178 void DrawStreamVideoQuad(const DrawingFrame* frame, 180 void DrawStreamVideoQuad(const DrawingFrame* frame,
179 const StreamVideoDrawQuad* quad); 181 const StreamVideoDrawQuad* quad);
180 void EnqueueTextureQuad(const DrawingFrame* frame, 182 void EnqueueTextureQuad(const DrawingFrame* frame,
181 const TextureDrawQuad* quad); 183 const TextureDrawQuad* quad);
182 void FlushTextureQuadCache(); 184 void FlushTextureQuadCache();
183 void DrawIOSurfaceQuad(const DrawingFrame* frame, 185 void DrawIOSurfaceQuad(const DrawingFrame* frame,
184 const IOSurfaceDrawQuad* quad); 186 const IOSurfaceDrawQuad* quad);
185 void DrawTileQuad(const DrawingFrame* frame, const TileDrawQuad* quad); 187 void DrawTileQuad(const DrawingFrame* frame, const TileDrawQuad* quad);
186 void DrawContentQuad(const DrawingFrame* frame, 188 void DrawContentQuad(const DrawingFrame* frame,
187 const ContentDrawQuadBase* quad, 189 const ContentDrawQuadBase* quad,
188 ResourceProvider::ResourceId resource_id); 190 ResourceProvider::ResourceId resource_id);
191 void DrawContentQuadAA(const DrawingFrame* frame,
192 const ContentDrawQuadBase* quad,
193 ResourceProvider::ResourceId resource_id,
194 const gfx::Transform& device_transform);
195 void DrawContentQuadNoAA(const DrawingFrame* frame,
196 const ContentDrawQuadBase* quad,
197 ResourceProvider::ResourceId resource_id);
189 void DrawYUVVideoQuad(const DrawingFrame* frame, 198 void DrawYUVVideoQuad(const DrawingFrame* frame,
190 const YUVVideoDrawQuad* quad); 199 const YUVVideoDrawQuad* quad);
191 void DrawPictureQuad(const DrawingFrame* frame, 200 void DrawPictureQuad(const DrawingFrame* frame,
192 const PictureDrawQuad* quad); 201 const PictureDrawQuad* quad);
193 202
194 void SetShaderOpacity(float opacity, int alpha_location); 203 void SetShaderOpacity(float opacity, int alpha_location);
195 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location); 204 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location);
196 void DrawQuadGeometry(const DrawingFrame* frame, 205 void DrawQuadGeometry(const DrawingFrame* frame,
197 const gfx::Transform& draw_transform, 206 const gfx::Transform& draw_transform,
198 const gfx::RectF& quad_rect, 207 const gfx::RectF& quad_rect,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 #if DEBUG_GL_CALLS && !defined(NDEBUG) 480 #if DEBUG_GL_CALLS && !defined(NDEBUG)
472 #define GLC(context, x) \ 481 #define GLC(context, x) \
473 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) 482 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__))
474 #else 483 #else
475 #define GLC(context, x) (x) 484 #define GLC(context, x) (x)
476 #endif 485 #endif
477 486
478 } // namespace cc 487 } // namespace cc
479 488
480 #endif // CC_OUTPUT_GL_RENDERER_H_ 489 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698