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

Side by Side Diff: chrome/browser/renderer_host/backing_store_xcb.cc

Issue 27147: Linux: server side backing stores (Closed)
Patch Set: ... Created 11 years, 10 months 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/renderer_host/backing_store.h"
6
7 #include <xcb/xcb.h>
8
9 #include "base/logging.h"
10 #include "chrome/common/transport_dib.h"
11
12 #ifdef NDEBUG
13 #define XCB_CALL(func, ...) func(__VA_ARGS__)
14 #else
15 #define XCB_CALL(func, ...) do { \
16 xcb_void_cookie_t cookie = func##_checked(__VA_ARGS__); \
17 xcb_generic_error_t* error = xcb_request_check(connection_, cookie); \
18 if (error) { \
19 CHECK(false) << "XCB error" \
20 << " code:" << error->error_code \
21 << " type:" << error->response_type \
22 << " sequence:" << error->sequence; \
23 } \
24 } while(false);
25 #endif
26
27 BackingStore::BackingStore(const gfx::Size& size,
28 xcb_connection_t* connection,
29 xcb_window_t window,
30 bool use_shared_memory)
31 : connection_(connection),
32 use_shared_memory_(use_shared_memory),
33 pixmap_(xcb_generate_id(connection)) {
34 XCB_CALL(xcb_create_pixmap, connection_, 32, pixmap, window, size.width(),
35 size.height());
36 }
37
38 BackingStore::~BackingStore() {
39 XCB_CALL(xcb_free_pixmap, pixmap_);
40 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/backing_store_x.cc ('k') | chrome/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698