Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/browser/renderer_host/backing_store_x.h

Issue 4319003: Replace TabContentsViewGtk with TabContentsViewViews as part of the ongoing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last patchset was missing canvas_direct2d.cc edit, fixed it and sent to try bots. Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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" 9 #include "app/x11_util.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "chrome/browser/renderer_host/backing_store.h" 12 #include "chrome/browser/renderer_host/backing_store.h"
13 13
14 namespace gfx {
15 class Point;
16 class Rect;
17 }
oshima 2010/11/08 20:59:38 // namespace gfx
Alex Nicolaou 2010/11/12 04:05:00 Done.
18
14 typedef struct _GdkDrawable GdkDrawable; 19 typedef struct _GdkDrawable GdkDrawable;
15 class SkBitmap; 20 class SkBitmap;
16 21
17 class BackingStoreX : public BackingStore { 22 class BackingStoreX : public BackingStore {
18 public: 23 public:
19 // Create a backing store on the X server. The visual is an Xlib Visual 24 // Create a backing store on the X server. The visual is an Xlib Visual
20 // describing the format of the target window and the depth is the color 25 // describing the format of the target window and the depth is the color
21 // depth of the X window which will be drawn into. 26 // depth of the X window which will be drawn into.
22 BackingStoreX(RenderWidgetHost* widget, 27 BackingStoreX(RenderWidgetHost* widget,
23 const gfx::Size& size, 28 const gfx::Size& size,
24 void* visual, 29 void* visual,
25 int depth); 30 int depth);
26 31
27 // This is for unittesting only. An object constructed using this constructor 32 // This is for unittesting only. An object constructed using this constructor
28 // will silently ignore all paints 33 // will silently ignore all paints
29 BackingStoreX(RenderWidgetHost* widget, const gfx::Size& size); 34 BackingStoreX(RenderWidgetHost* widget, const gfx::Size& size);
30 35
31 virtual ~BackingStoreX(); 36 virtual ~BackingStoreX();
32 37
33 Display* display() const { return display_; } 38 Display* display() const { return display_; }
34 XID root_window() const { return root_window_; } 39 XID root_window() const { return root_window_; }
35 40
36 // Copy from the server-side backing store to the target window 41 // Copy from the server-side backing store to the target window
37 // display: the display of the backing store and target window 42 // origin: the destination rectangle origin
38 // damage: the area to copy 43 // damage: the area to copy
39 // target: the X id of the target window 44 // target: the X id of the target window
45 void XShowRect(const gfx::Point &origin, const gfx::Rect& damage,
46 XID target);
47 // As above with origin 0,0
40 void XShowRect(const gfx::Rect& damage, XID target); 48 void XShowRect(const gfx::Rect& damage, XID target);
41 49
42 // As above, but use Cairo instead of Xlib. 50 // As above, but use Cairo instead of Xlib.
43 void CairoShowRect(const gfx::Rect& damage, GdkDrawable* drawable); 51 void CairoShowRect(const gfx::Rect& damage, GdkDrawable* drawable);
44 52
45 #if defined(TOOLKIT_GTK) 53 #if defined(TOOLKIT_GTK)
46 // Paint the backing store into the target's |dest_rect|. 54 // Paint the backing store into the target's |dest_rect|.
47 void PaintToRect(const gfx::Rect& dest_rect, GdkDrawable* target); 55 void PaintToRect(const gfx::Rect& dest_rect, GdkDrawable* target);
48 #endif 56 #endif
49 57
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 XID pixmap_; 95 XID pixmap_;
88 // This is the RENDER picture pointing at |pixmap_|. 96 // This is the RENDER picture pointing at |pixmap_|.
89 XID picture_; 97 XID picture_;
90 // This is a default graphic context, used in XCopyArea 98 // This is a default graphic context, used in XCopyArea
91 void* pixmap_gc_; 99 void* pixmap_gc_;
92 100
93 DISALLOW_COPY_AND_ASSIGN(BackingStoreX); 101 DISALLOW_COPY_AND_ASSIGN(BackingStoreX);
94 }; 102 };
95 103
96 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_X_H_ 104 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_X_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698