OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // As above, but use Cairo instead of Xlib. | 50 // As above, but use Cairo instead of Xlib. |
51 void CairoShowRect(const gfx::Rect& damage, GdkDrawable* drawable); | 51 void CairoShowRect(const gfx::Rect& damage, GdkDrawable* drawable); |
52 | 52 |
53 #if defined(TOOLKIT_GTK) | 53 #if defined(TOOLKIT_GTK) |
54 // Paint the backing store into the target's |dest_rect|. | 54 // Paint the backing store into the target's |dest_rect|. |
55 void PaintToRect(const gfx::Rect& dest_rect, GdkDrawable* target); | 55 void PaintToRect(const gfx::Rect& dest_rect, GdkDrawable* target); |
56 #endif | 56 #endif |
57 | 57 |
58 // BackingStore implementation. | 58 // BackingStore implementation. |
59 virtual size_t MemorySize(); | 59 virtual size_t MemorySize() OVERRIDE; |
60 virtual void PaintToBackingStore( | 60 virtual void PaintToBackingStore( |
61 RenderProcessHost* process, | 61 RenderProcessHost* process, |
62 TransportDIB::Id bitmap, | 62 TransportDIB::Id bitmap, |
63 const gfx::Rect& bitmap_rect, | 63 const gfx::Rect& bitmap_rect, |
64 const std::vector<gfx::Rect>& copy_rects, | 64 const std::vector<gfx::Rect>& copy_rects, |
65 const base::Closure& completion_callback, | 65 const base::Closure& completion_callback, |
66 bool* scheduled_completion_callback); | 66 bool* scheduled_completion_callback) OVERRIDE; |
67 virtual bool CopyFromBackingStore(const gfx::Rect& rect, | 67 virtual bool CopyFromBackingStore(const gfx::Rect& rect, |
68 skia::PlatformCanvas* output); | 68 skia::PlatformCanvas* output) OVERRIDE; |
69 virtual void ScrollBackingStore(int dx, int dy, | 69 virtual void ScrollBackingStore(int dx, int dy, |
70 const gfx::Rect& clip_rect, | 70 const gfx::Rect& clip_rect, |
71 const gfx::Size& view_size); | 71 const gfx::Size& view_size) OVERRIDE; |
72 | 72 |
73 private: | 73 private: |
74 // Paints the bitmap from the renderer onto the backing store without | 74 // Paints the bitmap from the renderer onto the backing store without |
75 // using Xrender to composite the pixmaps. | 75 // using Xrender to composite the pixmaps. |
76 void PaintRectWithoutXrender(TransportDIB* bitmap, | 76 void PaintRectWithoutXrender(TransportDIB* bitmap, |
77 const gfx::Rect& bitmap_rect, | 77 const gfx::Rect& bitmap_rect, |
78 const std::vector<gfx::Rect>& copy_rects); | 78 const std::vector<gfx::Rect>& copy_rects); |
79 | 79 |
80 // This is the connection to the X server where this backing store will be | 80 // This is the connection to the X server where this backing store will be |
81 // displayed. | 81 // displayed. |
(...skipping 14 matching lines...) Expand all Loading... |
96 XID pixmap_; | 96 XID pixmap_; |
97 // This is the RENDER picture pointing at |pixmap_|. | 97 // This is the RENDER picture pointing at |pixmap_|. |
98 XID picture_; | 98 XID picture_; |
99 // This is a default graphic context, used in XCopyArea | 99 // This is a default graphic context, used in XCopyArea |
100 void* pixmap_gc_; | 100 void* pixmap_gc_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(BackingStoreGtk); | 102 DISALLOW_COPY_AND_ASSIGN(BackingStoreGtk); |
103 }; | 103 }; |
104 | 104 |
105 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ | 105 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_GTK_H_ |
OLD | NEW |