From d0d408e6657d8a9fade4c442c7f5a78d835031c1 Mon Sep 17 00:00:00 2001 From: "jpetsovits@rim.com" Date: Fri, 29 Jun 2012 18:27:21 +0000 Subject: [PATCH] Add blitVisibleContents() as public API. https://bugs.webkit.org/show_bug.cgi?id=90211 Reviewed by Adam Treat. We keep blitContents() (with src/dst rectangles) for compatibility with older Cascades sprints for now, but want to switch to always blitting the full viewport and this is a good first step. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStore::blitVisibleContents): (WebKit): * Api/BackingStore.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121576 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit/blackberry/Api/BackingStore.cpp | 12 ++++++++++-- Source/WebKit/blackberry/Api/BackingStore.h | 1 + Source/WebKit/blackberry/ChangeLog | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Source/WebKit/blackberry/Api/BackingStore.cpp b/Source/WebKit/blackberry/Api/BackingStore.cpp index ad4b0db..88179b5 100644 --- a/Source/WebKit/blackberry/Api/BackingStore.cpp +++ b/Source/WebKit/blackberry/Api/BackingStore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009, 2010, 2011 Research In Motion Limited. All rights reserved. + * Copyright (C) 2009, 2010, 2011, 2012 Research In Motion Limited. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1159,8 +1159,11 @@ void BackingStorePrivate::blitVisibleContents(bool force) { // Blitting must never happen for direct rendering case. ASSERT(!shouldDirectRenderingToWindow()); - if (shouldDirectRenderingToWindow()) + if (shouldDirectRenderingToWindow()) { + BlackBerry::Platform::logAlways(BlackBerry::Platform::LogLevelCritical, + "BackingStore::blitVisibleContents operation not supported in direct rendering mode"); return; + } if (m_suspendScreenUpdates) { // Avoid client going into busy loop while updates suspended. @@ -2810,6 +2813,11 @@ void BackingStore::setScrollingOrZooming(bool scrollingOrZooming) d->setScrollingOrZooming(scrollingOrZooming); } +void BackingStore::blitVisibleContents() +{ + d->blitVisibleContents(false /*force*/); +} + void BackingStore::blitContents(const BlackBerry::Platform::IntRect& dstRect, const BlackBerry::Platform::IntRect& contents) { // Blitting during direct rendering is not supported. diff --git a/Source/WebKit/blackberry/Api/BackingStore.h b/Source/WebKit/blackberry/Api/BackingStore.h index b52a182..6ac9c38 100644 --- a/Source/WebKit/blackberry/Api/BackingStore.h +++ b/Source/WebKit/blackberry/Api/BackingStore.h @@ -59,6 +59,7 @@ public: bool isScrollingOrZooming() const; void setScrollingOrZooming(bool); + void blitVisibleContents(); void blitContents(const BlackBerry::Platform::IntRect& dstRect, const BlackBerry::Platform::IntRect& contents); void repaint(int x, int y, int width, int height, bool contentChanged, bool immediate); diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog index 3b2e0a7..307ba26 100644 --- a/Source/WebKit/blackberry/ChangeLog +++ b/Source/WebKit/blackberry/ChangeLog @@ -1,3 +1,21 @@ +2012-06-29 Jakob Petsovits + + Add blitVisibleContents() as public API. + https://bugs.webkit.org/show_bug.cgi?id=90211 + + Reviewed by Adam Treat. + + We keep blitContents() (with src/dst rectangles) + for compatibility with older Cascades sprints for now, + but want to switch to always blitting the full viewport + and this is a good first step. + + * Api/BackingStore.cpp: + (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): + (BlackBerry::WebKit::BackingStore::blitVisibleContents): + (WebKit): + * Api/BackingStore.h: + 2012-06-29 Konrad Piascik Don't hardcode target dpi of 160 (it should be 96 on desktop) -- 2.7.4