Skip to content

Commit

Permalink
Remove Mac's needs_gl_finish_workaround / gpu::FORCE_GL_FINISH_AFTER_…
Browse files Browse the repository at this point in the history
…COMPOSITING

It was once in effect for 10.6 and 10.7. But actually the code under
ui/accelerated_widget_mac that would have read the setting to apply the
workaround in IOSurfaceLayer went away in r356129 anyway.

BUG=579255, 546691
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel

Review URL: https://codereview.chromium.org/1823553002

Cr-Commit-Position: refs/heads/master@{#383028}
  • Loading branch information
tapted authored and Commit bot committed Mar 24, 2016
1 parent 47e7536 commit 2804ea7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 44 deletions.
10 changes: 1 addition & 9 deletions content/browser/compositor/browser_compositor_view_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
#include "base/lazy_instance.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/public/browser/context_factory.h"
#include "gpu/config/gpu_driver_bug_workaround_type.h"
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"

Expand All @@ -36,16 +34,10 @@
base::LazyInstance<scoped_ptr<BrowserCompositorMac>>
g_recyclable_browser_compositor;

bool WidgetNeedsGLFinishWorkaround() {
return GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive(
gpu::FORCE_GL_FINISH_AFTER_COMPOSITING);
}

} // namespace

BrowserCompositorMac::BrowserCompositorMac()
: accelerated_widget_mac_(
new ui::AcceleratedWidgetMac(WidgetNeedsGLFinishWorkaround())),
: accelerated_widget_mac_(new ui::AcceleratedWidgetMac()),
compositor_(content::GetContextFactory(),
ui::WindowResizeHelperMac::Get()->task_runner()) {
compositor_.SetAcceleratedWidget(
Expand Down
4 changes: 2 additions & 2 deletions gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TEST_P(GLCubeMapTextureTest, TexImage2DAfterFBOBinding) {
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());

glBindTexture(GL_TEXTURE_CUBE_MAP, texture_);
// force_gl_finish_after_compositing workaround prevents Nexus 5 crash.
// force_cube_map_positive_x_allocation workaround prevents Nexus 5 crash.
// TODO(dshwang): remove the workaround when it's fixed. crbug.com/518889
glTexImage2D(cube_map_target, 0, GL_RGBA, width_, width_, 0, GL_RGBA,
GL_UNSIGNED_BYTE, pixels_);
Expand Down Expand Up @@ -127,7 +127,7 @@ TEST_P(GLCubeMapTextureTest, ReadPixelsFromIncompleteCubeTexture) {
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, cube_map_target,
texture_, 0);

// force_gl_finish_after_compositing workaround prevents Nexus 5 crash.
// force_cube_map_positive_x_allocation workaround prevents Nexus 5 crash.
// TODO(dshwang): remove the workaround when it's fixed. crbug.com/518889
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());

Expand Down
19 changes: 1 addition & 18 deletions gpu/config/gpu_driver_bug_list_json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST(
{
"name": "gpu driver bug list",
// Please update the version number whenever you change this file.
"version": "8.54",
"version": "8.55",
"entries": [
{
"id": 1,
Expand Down Expand Up @@ -752,23 +752,6 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST(
"init_vertex_attributes"
]
},
{
"id": 66,
"description": "Force glFinish() after compositing on older OS X on Intel GPU",
"cr_bugs": [123409],
"os": {
"type": "macosx",
"version": {
"op": "<=",
"value": "10.7"
}
},
"vendor_id": "0x8086",
"multi_gpu_category": "active",
"features": [
"force_gl_finish_after_compositing"
]
},
{
"id": 68,
"description": "Disable partial swaps on linux drivers",
Expand Down
2 changes: 0 additions & 2 deletions gpu/config/gpu_driver_bug_workaround_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
force_cube_map_positive_x_allocation) \
GPU_OP(FORCE_DISCRETE_GPU, \
force_discrete_gpu) \
GPU_OP(FORCE_GL_FINISH_AFTER_COMPOSITING, \
force_gl_finish_after_compositing) \
GPU_OP(FORCE_INTEGRATED_GPU, \
force_integrated_gpu) \
GPU_OP(GL_BEGIN_GL_END_ON_FBO_CHANGE_TO_BACKBUFFER, \
Expand Down
6 changes: 1 addition & 5 deletions ui/accelerated_widget_mac/accelerated_widget_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AcceleratedWidgetMacNSView {
// in an NSView by setting the AcceleratedWidgetMacNSView for the helper.
class ACCELERATED_WIDGET_MAC_EXPORT AcceleratedWidgetMac {
public:
explicit AcceleratedWidgetMac(bool needs_gl_finish_workaround);
AcceleratedWidgetMac();
virtual ~AcceleratedWidgetMac();

gfx::AcceleratedWidget accelerated_widget() { return native_widget_; }
Expand Down Expand Up @@ -113,10 +113,6 @@ class ACCELERATED_WIDGET_MAC_EXPORT AcceleratedWidgetMac {
// The size in DIP of the last swap received from |compositor_|.
gfx::Size last_swap_size_dip_;

// Whether surfaces created by the widget should use the glFinish() workaround
// after compositing.
bool needs_gl_finish_workaround_;

DISALLOW_COPY_AND_ASSIGN(AcceleratedWidgetMac);
};

Expand Down
4 changes: 1 addition & 3 deletions ui/accelerated_widget_mac/accelerated_widget_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ - (void)setContentsChanged;
////////////////////////////////////////////////////////////////////////////////
// AcceleratedWidgetMac

AcceleratedWidgetMac::AcceleratedWidgetMac(bool needs_gl_finish_workaround)
: view_(NULL),
needs_gl_finish_workaround_(needs_gl_finish_workaround) {
AcceleratedWidgetMac::AcceleratedWidgetMac() : view_(nullptr) {
// Disable the fade-in animation as the layers are added.
ScopedCAActionDisabler disabler;

Expand Down
6 changes: 1 addition & 5 deletions ui/views/cocoa/bridged_native_widget.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1151,11 +1151,7 @@ NSComparisonResult SubviewSorter(NSViewComparatorValue lhs,

AddCompositorSuperview();

// TODO(tapted): Get this value from GpuDataManagerImpl via ViewsDelegate.
bool needs_gl_finish_workaround = false;

compositor_widget_.reset(
new ui::AcceleratedWidgetMac(needs_gl_finish_workaround));
compositor_widget_.reset(new ui::AcceleratedWidgetMac());
compositor_.reset(
new ui::Compositor(context_factory, GetCompositorTaskRunner()));
compositor_->SetAcceleratedWidget(compositor_widget_->accelerated_widget());
Expand Down

0 comments on commit 2804ea7

Please sign in to comment.