Commit 93d320d1 authored by yjliu's avatar yjliu Committed by Commit Bot

Wrapped OS_APPLE around |force_drawing_frame_framebuffer_unflipped_|

This flag is not used for other platforms except MAC so wrapping it in
the Chromium code search has a bug where references for Mac are not
indexed (128985) so it is confusing that code search doesn't show the
four references to this flag inside the #if defined (OS_APPLE) in
gl_renderer.cc.

Bug: n/a
Change-Id: Ife127ec0297e7fccb41e6be68665cde29210b0cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488722Reviewed-by: default avatarweiliangc <weiliangc@chromium.org>
Commit-Queue: weiliangc <weiliangc@chromium.org>
Auto-Submit: Jun Liu <yjliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819961}
parent 584ccf96
...@@ -3179,8 +3179,10 @@ void GLRenderer::GenerateMipmap() { ...@@ -3179,8 +3179,10 @@ void GLRenderer::GenerateMipmap() {
} }
bool GLRenderer::FlippedFramebuffer() const { bool GLRenderer::FlippedFramebuffer() const {
#if defined(OS_APPLE)
if (force_drawing_frame_framebuffer_unflipped_) if (force_drawing_frame_framebuffer_unflipped_)
return false; return false;
#endif
if (current_frame()->current_render_pass != current_frame()->root_render_pass) if (current_frame()->current_render_pass != current_frame()->root_render_pass)
return true; return true;
return FlippedRootFramebuffer(); return FlippedRootFramebuffer();
......
...@@ -463,12 +463,14 @@ class VIZ_SERVICE_EXPORT GLRenderer : public DirectRenderer { ...@@ -463,12 +463,14 @@ class VIZ_SERVICE_EXPORT GLRenderer : public DirectRenderer {
// If true, tints all the composited content to red. // If true, tints all the composited content to red.
bool tint_gl_composited_content_ = true; bool tint_gl_composited_content_ = true;
#if defined(OS_APPLE)
// The method FlippedFramebuffer determines whether the framebuffer associated // The method FlippedFramebuffer determines whether the framebuffer associated
// with a DrawingFrame is flipped. It makes the assumption that the // with a DrawingFrame is flipped. It makes the assumption that the
// DrawingFrame is being used as part of a render pass. If a DrawingFrame is // DrawingFrame is being used as part of a render pass. If a DrawingFrame is
// not being used as part of a render pass, setting it here forces // not being used as part of a render pass, setting it here forces
// FlippedFramebuffer to return |true|. // FlippedFramebuffer to return |true|.
bool force_drawing_frame_framebuffer_unflipped_ = false; bool force_drawing_frame_framebuffer_unflipped_ = false;
#endif
BoundGeometry bound_geometry_; BoundGeometry bound_geometry_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment