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

Unified Diff: chrome/browser/renderer_host/backing_store_x.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
Index: chrome/browser/renderer_host/backing_store_x.cc
diff --git a/chrome/browser/renderer_host/backing_store_x.cc b/chrome/browser/renderer_host/backing_store_x.cc
index 6cb7c91675836aa51fef745acce61820b23df255..52fd7dca20fe932bfd7362d2b7b9d6622ebedff2 100644
--- a/chrome/browser/renderer_host/backing_store_x.cc
+++ b/chrome/browser/renderer_host/backing_store_x.cc
@@ -24,41 +24,39 @@
// shared memory or over the wire, and XRENDER is used to convert them to the
// correct format for the backing store.
-BackingStore::BackingStore(const gfx::Size& size,
- Display* display,
- int depth,
+BackingStore::BackingStore(RenderWidgetHost* widget,
+ const gfx::Size& size,
void* visual,
- Drawable root_window,
- bool use_render,
- bool use_shared_memory)
- : size_(size),
- display_(display),
- use_shared_memory_(use_shared_memory),
- use_render_(use_render),
+ int depth)
+ : render_widget_host_(widget),
+ size_(size),
+ display_(x11_util::GetXDisplay()),
+ use_shared_memory_(x11_util::QuerySharedMemorySupport(display_)),
+ use_render_(x11_util::QueryRenderSupport(display_)),
visual_depth_(depth),
- root_window_(root_window) {
- const int width = size.width();
- const int height = size.height();
-
+ root_window_(x11_util::GetX11RootWindow()) {
COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN, assumes_little_endian);
- pixmap_ = XCreatePixmap(display_, root_window, width, height, depth);
+ pixmap_ = XCreatePixmap(display_, root_window_,
+ size.width(), size.height(), depth);
if (use_render_) {
picture_ = XRenderCreatePicture(
display_, pixmap_,
- x11_util::GetRenderVisualFormat(display_, static_cast<Visual*>(visual)),
- 0, NULL);
+ x11_util::GetRenderVisualFormat(display_,
+ static_cast<Visual*>(visual)),
+ 0, NULL);
} else {
picture_ = 0;
- pixmap_bpp_ = x11_util::BitsPerPixelForPixmapDepth(display, depth);
+ pixmap_bpp_ = x11_util::BitsPerPixelForPixmapDepth(display_, depth);
}
pixmap_gc_ = XCreateGC(display_, pixmap_, 0, NULL);
}
-BackingStore::BackingStore(const gfx::Size& size)
- : size_(size),
+BackingStore::BackingStore(RenderWidgetHost* widget, const gfx::Size& size)
+ : render_widget_host_(widget),
+ size_(size),
display_(NULL),
use_shared_memory_(false),
use_render_(false),
« no previous file with comments | « chrome/browser/renderer_host/backing_store_win.cc ('k') | chrome/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698