Skip to content

Commit

Permalink
Fix create OnScreen surface on Mac for compositor_unittests
Browse files Browse the repository at this point in the history
After issue https://codereview.chromium.org/227473009 there is no code for
create OnScreen surface for Mac which is using in compositor_unittests.
Result:
18 tests crashed:
    LayerWithDelegateTest.ConvertPointToLayer_Medium
    LayerWithDelegateTest.ConvertPointToLayer_Simple
    LayerWithDelegateTest.DelegatedLayer
    LayerWithDelegateTest.SchedulePaintFromOnPaintLayer
    LayerWithDelegateTest.SetBoundsWhenInvisible
    LayerWithNullDelegateTest.SetBoundsSchedulesPaint
    LayerWithNullDelegateTest.Visibility
    LayerWithRealCompositorTest.CompositorObservers
    LayerWithRealCompositorTest.Delegate
    LayerWithRealCompositorTest.Draw
    LayerWithRealCompositorTest.DrawPixels
    LayerWithRealCompositorTest.DrawTree
    LayerWithRealCompositorTest.Hierarchy
    LayerWithRealCompositorTest.HierarchyNoTexture
    LayerWithRealCompositorTest.ModifyHierarchy
    LayerWithRealCompositorTest.Opacity
    LayerWithRealCompositorTest.ScaleReparent
    LayerWithRealCompositorTest.ScaleUpDown

If surface is created then all tests passed.

R=sievers@chromium.org, ccameron1@chromium.org, danakj@chromium.org

TEST=compositor_unittests

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

Cr-Commit-Position: refs/heads/master@{#291863}
  • Loading branch information
lof84 authored and Commit bot committed Aug 26, 2014
1 parent 7182448 commit 18499aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/gl/gl_surface_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
NOTIMPLEMENTED() << "No onscreen support on Mac.";
return NULL;
}
case kGLImplementationOSMesaGL: {
scoped_refptr<GLSurface> surface(new GLSurfaceOSMesaHeadless());
if (!surface->Initialize())
return NULL;
return surface;
}
case kGLImplementationMockGL:
return new GLSurfaceStub;
default:
Expand Down

0 comments on commit 18499aa

Please sign in to comment.