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

Unified Diff: chrome/browser/renderer_host/backing_store.cc

Issue 27147: Linux: server side backing stores (Closed)
Patch Set: ... Created 11 years, 10 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/browser/renderer_host/backing_store.h ('k') | chrome/browser/renderer_host/backing_store_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/backing_store.cc
diff --git a/chrome/browser/renderer_host/backing_store.cc b/chrome/browser/renderer_host/backing_store.cc
index a68e78581cb62c2e51c8cd357cb2aa4e4ec5d8fb..8f8a1c98f925ad728b3a48362239911983bf870e 100644
--- a/chrome/browser/renderer_host/backing_store.cc
+++ b/chrome/browser/renderer_host/backing_store.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/renderer_host/backing_store.h"
-class RenderWidgetHost;
+#include "chrome/browser/renderer_host/render_widget_host.h"
namespace {
@@ -22,10 +22,10 @@ static int GetBackingStoreCacheSize() {
// Creates the backing store for the host based on the dimensions passed in.
// Removes the existing backing store if there is one.
BackingStore* CreateBackingStore(RenderWidgetHost* host,
- const gfx::Rect& backing_store_rect) {
+ const gfx::Size& backing_store_size) {
BackingStoreManager::RemoveBackingStore(host);
- BackingStore* backing_store = new BackingStore(backing_store_rect.size());
+ BackingStore* backing_store = host->AllocBackingStore(backing_store_size);
int backing_store_cache_size = GetBackingStoreCacheSize();
if (backing_store_cache_size > 0) {
if (!cache)
@@ -58,21 +58,21 @@ BackingStore* BackingStoreManager::GetBackingStore(
// static
BackingStore* BackingStoreManager::PrepareBackingStore(
RenderWidgetHost* host,
- const gfx::Rect& backing_store_rect,
+ const gfx::Size& backing_store_size,
base::ProcessHandle process_handle,
TransportDIB* bitmap,
const gfx::Rect& bitmap_rect,
bool* needs_full_paint) {
- BackingStore* backing_store = GetBackingStore(host,
- backing_store_rect.size());
+ BackingStore* backing_store = GetBackingStore(host, backing_store_size);
if (!backing_store) {
// We need to get Webkit to generate a new paint here, as we
// don't have a previous snapshot.
- if (bitmap_rect != backing_store_rect) {
+ if (bitmap_rect.size() != backing_store_size ||
+ bitmap_rect.x() != 0 || bitmap_rect.y() != 0) {
DCHECK(needs_full_paint != NULL);
*needs_full_paint = true;
}
- backing_store = CreateBackingStore(host, backing_store_rect);
+ backing_store = CreateBackingStore(host, backing_store_size);
}
DCHECK(backing_store != NULL);
« no previous file with comments | « chrome/browser/renderer_host/backing_store.h ('k') | chrome/browser/renderer_host/backing_store_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698