summaryrefslogtreecommitdiffstats
path: root/chrome/common/transport_dib_linux.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 21:41:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 21:41:02 +0000
commit67a46b7f6da205b7a1e772b7383bb20bab8ca611 (patch)
tree6345ab0ffb453906e3e4f8f87514b1e21649e6b6 /chrome/common/transport_dib_linux.cc
parent3cc848c2747c8bc2ecede8e8df4eeb343d3d8988 (diff)
downloadchromium_src-67a46b7f6da205b7a1e772b7383bb20bab8ca611.zip
chromium_src-67a46b7f6da205b7a1e772b7383bb20bab8ca611.tar.gz
chromium_src-67a46b7f6da205b7a1e772b7383bb20bab8ca611.tar.bz2
Adds kind-of-live thumbnail generation for a potential tab switcher.
This listens to tab events and tries to keep thumbnails ready to go. See thumbnail_generator.cc for a more detailed design. This adds a painting observer to the RenderWidgetHost to enable this new behavior, as well as a notification to allow the thumbnail generator to hook its observer in. There is also a new notification that a backing store has been disabled, which required making the backing stores know about their owning widget hosts. This component is currently disabled. We just need to uncomment the member in Profile and it will start to work. Original review: http://codereview.chromium.org/118420 Review URL: http://codereview.chromium.org/126101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/transport_dib_linux.cc')
-rwxr-xr-x[-rw-r--r--]chrome/common/transport_dib_linux.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/transport_dib_linux.cc b/chrome/common/transport_dib_linux.cc
index be673d9..1037341 100644..100755
--- a/chrome/common/transport_dib_linux.cc
+++ b/chrome/common/transport_dib_linux.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "chrome/common/transport_dib.h"
#include "chrome/common/x11_util.h"
+#include "skia/ext/platform_canvas.h"
// The shmat system call uses this as it's invalid return address
static void *const kInvalidAddress = (void*) -1;
@@ -80,6 +81,11 @@ TransportDIB* TransportDIB::Map(Handle shmkey) {
return dib;
}
+skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
+ return new skia::PlatformCanvas(w, h, true,
+ reinterpret_cast<uint8_t*>(memory()));
+}
+
void* TransportDIB::memory() const {
DCHECK_NE(address_, kInvalidAddress);
return address_;