Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5891)

Unified Diff: chrome/common/transport_dib_linux.cc

Issue 126101: Adds kind-of-live thumbnail generation for a potential tab switcher. (Closed)
Patch Set: For Checking hopefully Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/transport_dib.h ('k') | chrome/common/transport_dib_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/transport_dib_linux.cc
diff --git a/chrome/common/transport_dib_linux.cc b/chrome/common/transport_dib_linux.cc
old mode 100644
new mode 100755
index be673d908daeb116eaad02777c27f5d6ee91b25c..1037341cb88c9436a7514d52af712c05052cfc78
--- 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_;
« no previous file with comments | « chrome/common/transport_dib.h ('k') | chrome/common/transport_dib_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698