2009-02-05 Simon Fraser <simon.fraser@apple.com>

        Reviewed by Dan Bernstein

        https://bugs.webkit.org/show_bug.cgi?id=23362

        If the WebHTMLView uses accelerated compositing, we need for force
        the on-screen capture path and also force animations to start with -display
        since the DRT window has autodisplay disabled.

        * DumpRenderTree/mac/PixelDumpSupportMac.mm:
        (createBitmapContextFromWebView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7d00286b
2009-02-05 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein
https://bugs.webkit.org/show_bug.cgi?id=23362
If the WebHTMLView uses accelerated compositing, we need for force
the on-screen capture path and also force animations to start with -display
since the DRT window has autodisplay disabled.
* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContextFromWebView):
2009-02-03 miggilin <mr.diggilin@gmail.com>
Reviewed by Darin Adler.
......
......@@ -43,6 +43,7 @@
#import <WebKit/WebDocumentPrivate.h>
#import <WebKit/WebKit.h>
#import <WebKit/WebHTMLViewPrivate.h>
// To ensure pixel tests consistency, we need to always render in the same colorspace.
// Unfortunately, because of AppKit / WebKit constraints, we can't render directly in the colorspace of our choice.
......@@ -102,6 +103,17 @@ void setupMainDisplayColorProfile()
PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect)
{
// If the WebHTMLView uses accelerated compositing, we need for force the on-screen capture path
// and also force Core Animation to start its animations with -display since the DRT window has autodisplay disabled.
NSView* documentView = [[mainFrame frameView] documentView];
if ([documentView isKindOfClass:[WebHTMLView class]]) {
WebHTMLView* htmlView = (WebHTMLView*)documentView;
if ([htmlView respondsToSelector:@selector(_isUsingAcceleratedCompositing)] && [htmlView _isUsingAcceleratedCompositing]) {
[[htmlView window] display];
onscreen = YES;
}
}
WebView* view = [mainFrame webView];
NSSize webViewSize = [view frame].size;
size_t pixelsWide = static_cast<size_t>(webViewSize.width);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment