From 67a46b7f6da205b7a1e772b7383bb20bab8ca611 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Tue, 16 Jun 2009 21:41:02 +0000 Subject: 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 --- chrome/common/transport_dib_mac.cc | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 chrome/common/transport_dib_mac.cc (limited to 'chrome/common/transport_dib_mac.cc') diff --git a/chrome/common/transport_dib_mac.cc b/chrome/common/transport_dib_mac.cc old mode 100644 new mode 100755 index b4c7a2a7..638866c --- a/chrome/common/transport_dib_mac.cc +++ b/chrome/common/transport_dib_mac.cc @@ -9,6 +9,7 @@ #include "base/eintr_wrapper.h" #include "base/shared_memory.h" +#include "skia/ext/platform_canvas.h" TransportDIB::TransportDIB() : size_(0) { @@ -52,6 +53,11 @@ TransportDIB* TransportDIB::Map(TransportDIB::Handle handle) { return dib; } +skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) { + return new skia::PlatformCanvas(w, h, true, + reinterpret_cast(dib->memory())); +} + void* TransportDIB::memory() const { return shared_memory_.memory(); } -- cgit v1.1