OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 Display* display() const { return display_; } | 42 Display* display() const { return display_; } |
43 XID root_window() const { return root_window_; } | 43 XID root_window() const { return root_window_; } |
44 | 44 |
45 // Copy from the server-side backing store to the target window | 45 // Copy from the server-side backing store to the target window |
46 // origin: the destination rectangle origin | 46 // origin: the destination rectangle origin |
47 // damage: the area to copy | 47 // damage: the area to copy |
48 // target: the X id of the target window | 48 // target: the X id of the target window |
49 void XShowRect(const gfx::Point &origin, const gfx::Rect& damage, | 49 void XShowRect(const gfx::Point &origin, const gfx::Rect& damage, |
50 XID target); | 50 XID target); |
51 | 51 |
52 // As above, but use Cairo instead of Xlib. | |
53 void CairoShowRect(const gfx::Rect& damage, GdkDrawable* drawable); | |
54 | |
55 #if defined(TOOLKIT_GTK) | 52 #if defined(TOOLKIT_GTK) |
56 // Paint the backing store into the target's |dest_rect|. | 53 // Paint the backing store into the target's |dest_rect|. |
57 void PaintToRect(const gfx::Rect& dest_rect, GdkDrawable* target); | 54 void PaintToRect(const gfx::Rect& dest_rect, GdkDrawable* target); |
58 #endif | 55 #endif |
59 | 56 |
60 // BackingStore implementation. | 57 // BackingStore implementation. |
61 virtual size_t MemorySize() OVERRIDE; | 58 virtual size_t MemorySize() OVERRIDE; |
62 virtual void PaintToBackingStore( | 59 virtual void PaintToBackingStore( |
63 RenderProcessHost* process, | 60 RenderProcessHost* process, |
64 TransportDIB::Id bitmap, | 61 TransportDIB::Id bitmap, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 XID picture_; | 98 XID picture_; |
102 // This is a default graphic context, used in XCopyArea | 99 // This is a default graphic context, used in XCopyArea |
103 void* pixmap_gc_; | 100 void* pixmap_gc_; |
104 | 101 |
105 DISALLOW_COPY_AND_ASSIGN(BackingStoreGtk); | 102 DISALLOW_COPY_AND_ASSIGN(BackingStoreGtk); |
106 }; | 103 }; |
107 | 104 |
108 } // namespace content | 105 } // namespace content |
109 | 106 |
110 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ | 107 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ |
OLD | NEW |