summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/backing_store.h
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 21:39:22 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 21:39:22 +0000
commita72c6bb647954c92109a57b3edbb789195edda57 (patch)
tree7d7666fb98785b9bcfc784f61532abd7a485fad1 /chrome/browser/renderer_host/backing_store.h
parent3771f9bcce1d418162656f6b802f86784c998353 (diff)
downloadchromium_src-a72c6bb647954c92109a57b3edbb789195edda57.zip
chromium_src-a72c6bb647954c92109a57b3edbb789195edda57.tar.gz
chromium_src-a72c6bb647954c92109a57b3edbb789195edda57.tar.bz2
Update BackingStore to handle the case where our Cocoa view has
not been inserted into a window yet. BUG=20009 TEST=tabs opened in the background should not be blank when you switch to them. Review URL: http://codereview.chromium.org/175027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24941 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/backing_store.h')
-rw-r--r--chrome/browser/renderer_host/backing_store.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/backing_store.h b/chrome/browser/renderer_host/backing_store.h
index aea197b..df34eee 100644
--- a/chrome/browser/renderer_host/backing_store.h
+++ b/chrome/browser/renderer_host/backing_store.h
@@ -64,6 +64,10 @@ class BackingStore {
// A CGLayer that stores the contents of the backing store, cached in GPU
// memory if possible.
CGLayerRef cg_layer() { return cg_layer_; }
+ // A CGBitmapContext that stores the contents of the backing store if the
+ // corresponding Cocoa view has not been inserted into an NSWindow yet.
+ CGContextRef cg_bitmap() { return cg_bitmap_; }
+
// Paint the layer into a graphics context--if the target is a window,
// this should be a GPU->GPU copy (and therefore very fast).
void PaintToRect(const gfx::Rect& dest_rect, CGContextRef target);
@@ -118,6 +122,7 @@ class BackingStore {
// Number of bits per pixel of the screen.
int color_depth_;
#elif defined(OS_MACOSX)
+ scoped_cftyperef<CGContextRef> cg_bitmap_;
scoped_cftyperef<CGLayerRef> cg_layer_;
#elif defined(OS_LINUX)
// Paints the bitmap from the renderer onto the backing store without