OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_X_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_X_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_X_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_X_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/x11_util.h" | |
10 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
11 #include "build/build_config.h" | 10 #include "build/build_config.h" |
12 #include "chrome/browser/renderer_host/backing_store.h" | 11 #include "chrome/browser/renderer_host/backing_store.h" |
| 12 #include "ui/base/x/x11_util.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Point; | 15 class Point; |
16 class Rect; | 16 class Rect; |
17 } // namespace gfx | 17 } // namespace gfx |
18 | 18 |
19 typedef struct _GdkDrawable GdkDrawable; | 19 typedef struct _GdkDrawable GdkDrawable; |
20 class SkBitmap; | 20 class SkBitmap; |
21 | 21 |
22 class BackingStoreX : public BackingStore { | 22 class BackingStoreX : public BackingStore { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Paints the bitmap from the renderer onto the backing store without | 70 // Paints the bitmap from the renderer onto the backing store without |
71 // using Xrender to composite the pixmaps. | 71 // using Xrender to composite the pixmaps. |
72 void PaintRectWithoutXrender(TransportDIB* bitmap, | 72 void PaintRectWithoutXrender(TransportDIB* bitmap, |
73 const gfx::Rect& bitmap_rect, | 73 const gfx::Rect& bitmap_rect, |
74 const std::vector<gfx::Rect>& copy_rects); | 74 const std::vector<gfx::Rect>& copy_rects); |
75 | 75 |
76 // This is the connection to the X server where this backing store will be | 76 // This is the connection to the X server where this backing store will be |
77 // displayed. | 77 // displayed. |
78 Display* const display_; | 78 Display* const display_; |
79 // What flavor, if any, MIT-SHM (X shared memory) support we have. | 79 // What flavor, if any, MIT-SHM (X shared memory) support we have. |
80 const x11_util::SharedMemorySupport shared_memory_support_; | 80 const ui::SharedMemorySupport shared_memory_support_; |
81 // If this is true, then we can use Xrender to composite our pixmaps. | 81 // If this is true, then we can use Xrender to composite our pixmaps. |
82 const bool use_render_; | 82 const bool use_render_; |
83 // If |use_render_| is false, this is the number of bits-per-pixel for |depth| | 83 // If |use_render_| is false, this is the number of bits-per-pixel for |depth| |
84 int pixmap_bpp_; | 84 int pixmap_bpp_; |
85 // if |use_render_| is false, we need the Visual to get the RGB masks. | 85 // if |use_render_| is false, we need the Visual to get the RGB masks. |
86 void* const visual_; | 86 void* const visual_; |
87 // This is the depth of the target window. | 87 // This is the depth of the target window. |
88 const int visual_depth_; | 88 const int visual_depth_; |
89 // The parent window (probably a GtkDrawingArea) for this backing store. | 89 // The parent window (probably a GtkDrawingArea) for this backing store. |
90 const XID root_window_; | 90 const XID root_window_; |
91 // This is a handle to the server side pixmap which is our backing store. | 91 // This is a handle to the server side pixmap which is our backing store. |
92 XID pixmap_; | 92 XID pixmap_; |
93 // This is the RENDER picture pointing at |pixmap_|. | 93 // This is the RENDER picture pointing at |pixmap_|. |
94 XID picture_; | 94 XID picture_; |
95 // This is a default graphic context, used in XCopyArea | 95 // This is a default graphic context, used in XCopyArea |
96 void* pixmap_gc_; | 96 void* pixmap_gc_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(BackingStoreX); | 98 DISALLOW_COPY_AND_ASSIGN(BackingStoreX); |
99 }; | 99 }; |
100 | 100 |
101 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_X_H_ | 101 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_X_H_ |
OLD | NEW |