| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const gfx::Size& size() { return size_; } | 50 const gfx::Size& size() { return size_; } |
| 51 | 51 |
| 52 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
| 53 HDC hdc() { return hdc_; } | 53 HDC hdc() { return hdc_; } |
| 54 | 54 |
| 55 // Returns true if we should convert to the monitor profile when painting. | 55 // Returns true if we should convert to the monitor profile when painting. |
| 56 static bool ColorManagementEnabled(); | 56 static bool ColorManagementEnabled(); |
| 57 #elif defined(OS_MACOSX) | 57 #elif defined(OS_MACOSX) |
| 58 skia::PlatformCanvas* canvas() { return &canvas_; } | 58 skia::PlatformCanvas* canvas() { return &canvas_; } |
| 59 #elif defined(OS_LINUX) | 59 #elif defined(OS_LINUX) |
| 60 Display* display() const { return display_; } |
| 61 XID root_window() const { return root_window_; }; |
| 62 |
| 60 // Copy from the server-side backing store to the target window | 63 // Copy from the server-side backing store to the target window |
| 61 // display: the display of the backing store and target window | 64 // display: the display of the backing store and target window |
| 62 // damage: the area to copy | 65 // damage: the area to copy |
| 63 // target: the X id of the target window | 66 // target: the X id of the target window |
| 64 void ShowRect(const gfx::Rect& damage, XID target); | 67 void ShowRect(const gfx::Rect& damage, XID target); |
| 65 | 68 |
| 66 // Paints the server-side backing store data to a SkBitmap. | 69 // Paints the server-side backing store data to a SkBitmap. On failure, the |
| 67 SkBitmap* PaintRectToBitmap(const gfx::Rect& rect); | 70 // return bitmap will be isNull(). |
| 71 SkBitmap PaintRectToBitmap(const gfx::Rect& rect); |
| 68 #endif | 72 #endif |
| 69 | 73 |
| 70 // Paints the bitmap from the renderer onto the backing store. | 74 // Paints the bitmap from the renderer onto the backing store. |
| 71 void PaintRect(base::ProcessHandle process, | 75 void PaintRect(base::ProcessHandle process, |
| 72 TransportDIB* bitmap, | 76 TransportDIB* bitmap, |
| 73 const gfx::Rect& bitmap_rect); | 77 const gfx::Rect& bitmap_rect); |
| 74 | 78 |
| 75 // Scrolls the given rect in the backing store, replacing the given region | 79 // Scrolls the given rect in the backing store, replacing the given region |
| 76 // identified by |bitmap_rect| by the bitmap in the file identified by the | 80 // identified by |bitmap_rect| by the bitmap in the file identified by the |
| 77 // given file handle. | 81 // given file handle. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // This is the RENDER picture pointing at |pixmap_|. | 129 // This is the RENDER picture pointing at |pixmap_|. |
| 126 XID picture_; | 130 XID picture_; |
| 127 // This is a default graphic context, used in XCopyArea | 131 // This is a default graphic context, used in XCopyArea |
| 128 void* pixmap_gc_; | 132 void* pixmap_gc_; |
| 129 #endif | 133 #endif |
| 130 | 134 |
| 131 DISALLOW_COPY_AND_ASSIGN(BackingStore); | 135 DISALLOW_COPY_AND_ASSIGN(BackingStore); |
| 132 }; | 136 }; |
| 133 | 137 |
| 134 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ | 138 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ |
| OLD | NEW |