⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268446 in webkit


Ignore:
Timestamp:
Oct 14, 2020, 2:18:23 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION: fast/canvas/webgl/context-attributes-alpha.html fails
https://bugs.webkit.org/show_bug.cgi?id=217697

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-10-14
Reviewed by Antti Koivisto.

The original work in "Cocoa: Make WebGLLayer not dependent on
GraphicsContextGLOpenGL" was missing the hunk to initialize
WebGLLayer contentsOpaque. Neither the EWS nor the local testing
used the test case.

No new tests, tested by
fast/canvas/webgl/context-attributes-alpha.html.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

  • platform/graphics/cocoa/WebGLLayer.h:
  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithClient:devicePixelRatio:contentsOpaque:]):
(-[WebGLLayer initWithClient:devicePixelRatio:]): Deleted.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r268444 r268446  
     12020-10-14  Kimmo Kinnunen  <kkinnunen@apple.com>
     2
     3        REGRESSION: fast/canvas/webgl/context-attributes-alpha.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=217697
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The original work in "Cocoa: Make WebGLLayer not dependent on
     9        GraphicsContextGLOpenGL" was missing the hunk to initialize
     10        WebGLLayer contentsOpaque. Neither the EWS nor the local testing
     11        used the test case.
     12
     13        No new tests, tested by
     14        fast/canvas/webgl/context-attributes-alpha.html.
     15
     16        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
     17        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
     18        * platform/graphics/cocoa/WebGLLayer.h:
     19        * platform/graphics/cocoa/WebGLLayer.mm:
     20        (-[WebGLLayer initWithClient:devicePixelRatio:contentsOpaque:]):
     21        (-[WebGLLayer initWithClient:devicePixelRatio:]): Deleted.
     22
    1232020-10-13  Antoine Quint  <graouts@webkit.org>
    224
  • trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm

    r268386 r268446  
    335335    // Create the WebGLLayer
    336336    BEGIN_BLOCK_OBJC_EXCEPTIONS
    337         m_webGLLayer = adoptNS([[WebGLLayer alloc] initWithClient:this devicePixelRatio:attrs.devicePixelRatio]);
     337        m_webGLLayer = adoptNS([[WebGLLayer alloc] initWithClient:this devicePixelRatio:attrs.devicePixelRatio contentsOpaque:!attrs.alpha]);
    338338#ifndef NDEBUG
    339339        [m_webGLLayer setName:@"WebGL Layer"];
  • trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h

    r268386 r268446  
    4949@interface WebGLLayer : CALayer
    5050
    51 - (id)initWithClient:(NakedPtr<WebCore::WebGLLayerClient>)client devicePixelRatio:(float)devicePixelRatio;
     51- (id)initWithClient:(NakedPtr<WebCore::WebGLLayerClient>)client devicePixelRatio:(float)devicePixelRatio contentsOpaque:(bool)contentsOpaque;
    5252
    5353- (CGImageRef)copyImageSnapshotWithColorSpace:(CGColorSpaceRef)colorSpace;
  • trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm

    r268386 r268446  
    4444}
    4545
    46 - (id)initWithClient:(NakedPtr<WebCore::WebGLLayerClient>)client devicePixelRatio:(float)devicePixelRatio
     46- (id)initWithClient:(NakedPtr<WebCore::WebGLLayerClient>)client devicePixelRatio:(float)devicePixelRatio contentsOpaque:(bool)contentsOpaque
    4747{
    4848    _client = client;
    4949    self = [super init];
    5050    self.transform = CATransform3DIdentity;
     51    self.contentsOpaque = contentsOpaque;
    5152    self.contentsScale = devicePixelRatio;
    5253    return self;
Note: See TracChangeset for help on using the changeset viewer.