|
Lines 141-171
uint32_t GraphicsContext3DPrivate::copyToGraphicsSurface()
Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp_sec1
|
| 141 |
m_platformSurface->setGeometry(IntRect(0, 0, m_context->m_currentWidth, m_context->m_currentHeight)); |
141 |
m_platformSurface->setGeometry(IntRect(0, 0, m_context->m_currentWidth, m_context->m_currentHeight)); |
| 142 |
} |
142 |
} |
| 143 |
|
143 |
|
| 144 |
bool enableScissorTest = false; |
144 |
#if !USE(OPENGL_ES_2) |
| 145 |
int width = m_context->m_currentWidth; |
|
|
| 146 |
int height = m_context->m_currentHeight; |
| 147 |
|
| 148 |
// We should copy the full buffer, and not respect the current scissor bounds. |
| 149 |
// FIXME: It would be more efficient to track the state of the scissor test. |
| 150 |
if (m_context->isEnabled(GraphicsContext3D::SCISSOR_TEST)) { |
| 151 |
enableScissorTest = true; |
| 152 |
m_context->disable(GraphicsContext3D::SCISSOR_TEST); |
| 153 |
} |
| 154 |
|
| 155 |
if (m_context->m_attrs.antialias) { |
145 |
if (m_context->m_attrs.antialias) { |
|
|
146 |
bool enableScissorTest = false; |
| 147 |
int width = m_context->m_currentWidth; |
| 148 |
int height = m_context->m_currentHeight; |
| 149 |
// We should copy the full buffer, and not respect the current scissor bounds. |
| 150 |
// FIXME: It would be more efficient to track the state of the scissor test. |
| 151 |
if (m_context->isEnabled(GraphicsContext3D::SCISSOR_TEST)) { |
| 152 |
enableScissorTest = true; |
| 153 |
m_context->disable(GraphicsContext3D::SCISSOR_TEST); |
| 154 |
} |
| 156 |
|
155 |
|
| 157 |
glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, m_context->m_multisampleFBO); |
156 |
glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, m_context->m_multisampleFBO); |
| 158 |
glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, m_context->m_fbo); |
157 |
glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, m_context->m_fbo); |
| 159 |
|
158 |
|
| 160 |
// Use NEAREST as no scale is performed during the blit. |
159 |
// Use NEAREST as no scale is performed during the blit. |
| 161 |
glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, GraphicsContext3D::COLOR_BUFFER_BIT, GraphicsContext3D::NEAREST); |
160 |
glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, GraphicsContext3D::COLOR_BUFFER_BIT, GraphicsContext3D::NEAREST); |
|
|
161 |
|
| 162 |
if (enableScissorTest) |
| 163 |
m_context->enable(GraphicsContext3D::SCISSOR_TEST); |
| 162 |
} |
164 |
} |
|
|
165 |
#endif |
| 163 |
|
166 |
|
| 164 |
m_platformSurface->updateContents(m_context->m_texture, m_context->m_boundFBO, m_context->m_boundTexture0); |
167 |
m_platformSurface->updateContents(m_context->m_texture, m_context->m_boundFBO, m_context->m_boundTexture0); |
| 165 |
|
168 |
|
| 166 |
if (enableScissorTest) |
|
|
| 167 |
m_context->enable(GraphicsContext3D::SCISSOR_TEST); |
| 168 |
|
| 169 |
return 0; |
169 |
return 0; |
| 170 |
} |
170 |
} |
| 171 |
|
171 |
|