| 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 contents of clip_rect in the backing store by dx or dy (but dx | 101 // Scrolls the given rect in the backing store, replacing the given region |
| 102 // and dy cannot both be non-zero). | 102 // identified by |bitmap_rect| by the bitmap in the file identified by the |
| 103 void ScrollRect(int dx, int dy, | 103 // given file handle. |
| 104 void ScrollRect(base::ProcessHandle process, |
| 105 TransportDIB* bitmap, const gfx::Rect& bitmap_rect, |
| 106 int dx, int dy, |
| 104 const gfx::Rect& clip_rect, | 107 const gfx::Rect& clip_rect, |
| 105 const gfx::Size& view_size); | 108 const gfx::Size& view_size); |
| 106 | 109 |
| 107 private: | 110 private: |
| 108 #if defined(OS_MACOSX) | 111 #if defined(OS_MACOSX) |
| 109 // Creates a CGLayer associated with its owner view's window's graphics | 112 // Creates a CGLayer associated with its owner view's window's graphics |
| 110 // context, sized properly for the backing store. Returns NULL if the owner | 113 // context, sized properly for the backing store. Returns NULL if the owner |
| 111 // is not in a window with a CGContext. cg_layer_ is assigned this method's | 114 // is not in a window with a CGContext. cg_layer_ is assigned this method's |
| 112 // result. | 115 // result. |
| 113 CGLayerRef CreateCGLayer(); | 116 CGLayerRef CreateCGLayer(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // This is the RENDER picture pointing at |pixmap_|. | 166 // This is the RENDER picture pointing at |pixmap_|. |
| 164 XID picture_; | 167 XID picture_; |
| 165 // This is a default graphic context, used in XCopyArea | 168 // This is a default graphic context, used in XCopyArea |
| 166 void* pixmap_gc_; | 169 void* pixmap_gc_; |
| 167 #endif | 170 #endif |
| 168 | 171 |
| 169 DISALLOW_COPY_AND_ASSIGN(BackingStore); | 172 DISALLOW_COPY_AND_ASSIGN(BackingStore); |
| 170 }; | 173 }; |
| 171 | 174 |
| 172 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ | 175 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ |
| OLD | NEW |