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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1054883004: Revert of Use the desktop GL core profile on Linux when ES3 support is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index d1d1d9ce97e67a92688eff24a752e9cb06fd542a..d402c935ba4c63d940a3c6d4eefbbeb9b5cf92dc 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1688,10 +1688,6 @@
const FeatureInfo::Workarounds& workarounds() const {
return feature_info_->workarounds();
- }
-
- const gfx::GLVersionInfo& gl_version() const {
- return feature_info_->gl_version_info();
}
bool ShouldDeferDraws() {
@@ -2743,7 +2739,7 @@
bool default_fb = (GetBackbufferServiceId() == 0);
- if (gl_version().is_desktop_core_profile) {
+ if (feature_info_->gl_version_info().is_desktop_core_profile) {
glGetFramebufferAttachmentParameterivEXT(
GL_FRAMEBUFFER,
default_fb ? GL_BACK_LEFT : GL_COLOR_ATTACHMENT0,
@@ -2782,7 +2778,7 @@
// mailing list archives. It also implicitly enables the desktop GL
// capability GL_POINT_SPRITE to provide access to the gl_PointCoord
// variable in fragment shaders.
- if (!gl_version().BehavesLikeGLES()) {
+ if (!feature_info_->gl_version_info().BehavesLikeGLES()) {
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
glEnable(GL_POINT_SPRITE);
}
@@ -3020,11 +3016,8 @@
else
resources.HashFunction = NULL;
ShaderTranslatorInterface::GlslImplementationType implementation_type =
- ShaderTranslatorInterface::kGlsl;
- if (gl_version().is_es)
- implementation_type = ShaderTranslatorInterface::kGlslES;
- else if (gl_version().is_desktop_core_profile)
- implementation_type = ShaderTranslatorInterface::kGlslCoreProfile;
+ gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 ?
+ ShaderTranslatorInterface::kGlslES : ShaderTranslatorInterface::kGlsl;
int driver_bug_workarounds = 0;
if (workarounds().needs_glsl_built_in_function_emulation)
driver_bug_workarounds |= SH_EMULATE_BUILT_IN_FUNCTIONS;
@@ -4596,7 +4589,7 @@
}
ScopedRenderTo do_render(framebuffer);
- if (gl_version().is_es3) {
+ if (feature_info_->gl_version_info().is_es3) {
glInvalidateFramebuffer(
target, numAttachments, translated_attachments.get());
} else {
@@ -4778,7 +4771,7 @@
*num_written = 1;
if (params) {
GLint v = 0;
- if (gl_version().is_desktop_core_profile) {
+ if (feature_info_->gl_version_info().is_desktop_core_profile) {
Framebuffer* framebuffer =
GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER_EXT);
if (framebuffer) {
@@ -4799,7 +4792,7 @@
*num_written = 1;
if (params) {
GLint v = 0;
- if (gl_version().is_desktop_core_profile) {
+ if (feature_info_->gl_version_info().is_desktop_core_profile) {
Framebuffer* framebuffer =
GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER_EXT);
if (framebuffer) {
@@ -4821,7 +4814,7 @@
*num_written = 1;
if (params) {
GLint v = 0;
- if (gl_version().is_desktop_core_profile) {
+ if (feature_info_->gl_version_info().is_desktop_core_profile) {
Framebuffer* framebuffer =
GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER_EXT);
if (framebuffer) {
@@ -4852,7 +4845,7 @@
*num_written = 1;
if (params) {
GLint v = 0;
- if (gl_version().is_desktop_core_profile) {
+ if (feature_info_->gl_version_info().is_desktop_core_profile) {
Framebuffer* framebuffer =
GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER_EXT);
if (framebuffer) {
@@ -5696,7 +5689,7 @@
GLenum filter) {
// TODO(sievers): This could be resolved at the GL binding level, but the
// binding process is currently a bit too 'brute force'.
- if (gl_version().is_angle) {
+ if (feature_info_->gl_version_info().is_angle) {
glBlitFramebufferANGLE(
srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
} else if (feature_info_->feature_flags().use_core_framebuffer_multisample) {
@@ -6711,7 +6704,7 @@
DCHECK(simulated);
*simulated = false;
- if (gl_version().BehavesLikeGLES())
+ if (feature_info_->gl_version_info().BehavesLikeGLES())
return true;
const VertexAttrib* attrib =
@@ -8068,7 +8061,7 @@
glGenBuffersARB(1, &buffer);
glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, buffer);
// For ANGLE client version 2, GL_STREAM_READ is not available.
- const GLenum usage_hint = gl_version().is_angle ?
+ const GLenum usage_hint = feature_info_->gl_version_info().is_angle ?
GL_STATIC_DRAW : GL_STREAM_READ;
glBufferData(GL_PIXEL_PACK_BUFFER_ARB, pixels_size, NULL, usage_hint);
GLenum error = glGetError();
@@ -10300,7 +10293,7 @@
// Ensure the side effects of the copy are visible to the parent
// context. There is no need to do this for ANGLE because it uses a
// single D3D device for all contexts.
- if (!gl_version().is_angle)
+ if (!feature_info_->gl_version_info().is_angle)
glFlush();
}
} else {
« no previous file with comments | « gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc ('k') | gpu/command_buffer/service/shader_translator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698