| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
| 10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 // Paints the bitmap from the renderer onto the backing store. bitmap_rect | 93 // Paints the bitmap from the renderer onto the backing store. bitmap_rect |
| 94 // gives the location of bitmap, and copy_rect specifies the subregion of | 94 // gives the location of bitmap, and copy_rect specifies the subregion of |
| 95 // the backingstore to be painted from the bitmap. | 95 // the backingstore to be painted from the bitmap. |
| 96 void PaintRect(base::ProcessHandle process, | 96 void PaintRect(base::ProcessHandle process, |
| 97 TransportDIB* bitmap, | 97 TransportDIB* bitmap, |
| 98 const gfx::Rect& bitmap_rect, | 98 const gfx::Rect& bitmap_rect, |
| 99 const gfx::Rect& copy_rect); | 99 const gfx::Rect& copy_rect); |
| 100 | 100 |
| 101 // Scrolls the given rect in the backing store, replacing the given region | 101 // Scrolls the contents of clip_rect in the backing store by dx or dy (but dx |
| 102 // identified by |bitmap_rect| by the bitmap in the file identified by the | 102 // and dy cannot both be non-zero). |
| 103 // given file handle. | 103 void ScrollRect(int dx, int dy, |
| 104 void ScrollRect(base::ProcessHandle process, | |
| 105 TransportDIB* bitmap, const gfx::Rect& bitmap_rect, | |
| 106 int dx, int dy, | |
| 107 const gfx::Rect& clip_rect, | 104 const gfx::Rect& clip_rect, |
| 108 const gfx::Size& view_size); | 105 const gfx::Size& view_size); |
| 109 | 106 |
| 110 private: | 107 private: |
| 111 #if defined(OS_MACOSX) | 108 #if defined(OS_MACOSX) |
| 112 // Creates a CGLayer associated with its owner view's window's graphics | 109 // Creates a CGLayer associated with its owner view's window's graphics |
| 113 // context, sized properly for the backing store. Returns NULL if the owner | 110 // context, sized properly for the backing store. Returns NULL if the owner |
| 114 // is not in a window with a CGContext. cg_layer_ is assigned this method's | 111 // is not in a window with a CGContext. cg_layer_ is assigned this method's |
| 115 // result. | 112 // result. |
| 116 CGLayerRef CreateCGLayer(); | 113 CGLayerRef CreateCGLayer(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // This is the RENDER picture pointing at |pixmap_|. | 163 // This is the RENDER picture pointing at |pixmap_|. |
| 167 XID picture_; | 164 XID picture_; |
| 168 // This is a default graphic context, used in XCopyArea | 165 // This is a default graphic context, used in XCopyArea |
| 169 void* pixmap_gc_; | 166 void* pixmap_gc_; |
| 170 #endif | 167 #endif |
| 171 | 168 |
| 172 DISALLOW_COPY_AND_ASSIGN(BackingStore); | 169 DISALLOW_COPY_AND_ASSIGN(BackingStore); |
| 173 }; | 170 }; |
| 174 | 171 |
| 175 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ | 172 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ |
| OLD | NEW |