| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 TransportDIB* bitmap, const gfx::Rect& bitmap_rect, | 74 TransportDIB* bitmap, const gfx::Rect& bitmap_rect, |
| 75 int dx, int dy, | 75 int dx, int dy, |
| 76 const gfx::Rect& clip_rect, | 76 const gfx::Rect& clip_rect, |
| 77 const gfx::Size& view_size); | 77 const gfx::Size& view_size); |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 // The size of the backing store. | 80 // The size of the backing store. |
| 81 gfx::Size size_; | 81 gfx::Size size_; |
| 82 | 82 |
| 83 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
| 84 // Creates a dib conforming to the height/width/section parameters passed | |
| 85 // in. The use_os_color_depth parameter controls whether we use the color | |
| 86 // depth to create an appropriate dib or not. | |
| 87 HANDLE CreateDIB(HDC dc, | |
| 88 int width, int height, | |
| 89 bool use_os_color_depth, | |
| 90 HANDLE section); | |
| 91 | 84 |
| 92 // The backing store dc. | 85 // The backing store dc. |
| 93 HDC hdc_; | 86 HDC hdc_; |
| 94 | |
| 95 // Handle to the backing store dib. | 87 // Handle to the backing store dib. |
| 96 HANDLE backing_store_dib_; | 88 HANDLE backing_store_dib_; |
| 97 | |
| 98 // Handle to the original bitmap in the dc. | 89 // Handle to the original bitmap in the dc. |
| 99 HANDLE original_bitmap_; | 90 HANDLE original_bitmap_; |
| 91 // Number of bits per pixel of the screen. |
| 92 int color_depth_; |
| 100 #elif defined(OS_MACOSX) | 93 #elif defined(OS_MACOSX) |
| 101 skia::PlatformCanvas canvas_; | 94 skia::PlatformCanvas canvas_; |
| 102 #elif defined(OS_LINUX) | 95 #elif defined(OS_LINUX) |
| 103 // Paints the bitmap from the renderer onto the backing store without | 96 // Paints the bitmap from the renderer onto the backing store without |
| 104 // using Xrender to composite the pixmaps. | 97 // using Xrender to composite the pixmaps. |
| 105 void PaintRectWithoutXrender(TransportDIB* bitmap, | 98 void PaintRectWithoutXrender(TransportDIB* bitmap, |
| 106 const gfx::Rect& bitmap_rect); | 99 const gfx::Rect& bitmap_rect); |
| 107 | 100 |
| 108 // This is the connection to the X server where this backing store will be | 101 // This is the connection to the X server where this backing store will be |
| 109 // displayed. | 102 // displayed. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 static void RemoveBackingStore(RenderWidgetHost* host); | 168 static void RemoveBackingStore(RenderWidgetHost* host); |
| 176 | 169 |
| 177 private: | 170 private: |
| 178 // Not intended for instantiation. | 171 // Not intended for instantiation. |
| 179 BackingStoreManager() {} | 172 BackingStoreManager() {} |
| 180 | 173 |
| 181 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); | 174 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); |
| 182 }; | 175 }; |
| 183 | 176 |
| 184 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ | 177 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_H_ |
| OLD | NEW |