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

Side by Side Diff: content/browser/aura/software_output_device_x11.cc

Issue 23460052: Move XID, XDisplay, GetXDisplay and a few other types to ui/gfx/x/x11_types.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sdf Created 7 years, 3 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/browser/aura/software_output_device_x11.h" 5 #include "content/browser/aura/software_output_device_x11.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/Xutil.h> 8 #include <X11/Xutil.h>
9 9
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "third_party/skia/include/core/SkDevice.h" 12 #include "third_party/skia/include/core/SkDevice.h"
13 #include "ui/compositor/compositor.h" 13 #include "ui/compositor/compositor.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 SoftwareOutputDeviceX11::SoftwareOutputDeviceX11(ui::Compositor* compositor) 17 SoftwareOutputDeviceX11::SoftwareOutputDeviceX11(ui::Compositor* compositor)
18 : compositor_(compositor), 18 : compositor_(compositor),
19 display_(ui::GetXDisplay()), 19 display_(gfx::GetXDisplay()),
20 gc_(NULL), 20 gc_(NULL),
21 image_(NULL) { 21 image_(NULL) {
22 // TODO(skaslev) Remove this when crbug.com/180702 is fixed. 22 // TODO(skaslev) Remove this when crbug.com/180702 is fixed.
23 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 23 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
24 24
25 gc_ = XCreateGC(display_, compositor_->widget(), 0, NULL); 25 gc_ = XCreateGC(display_, compositor_->widget(), 0, NULL);
26 } 26 }
27 27
28 SoftwareOutputDeviceX11::~SoftwareOutputDeviceX11() { 28 SoftwareOutputDeviceX11::~SoftwareOutputDeviceX11() {
29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return; 78 return;
79 79
80 // TODO(skaslev): Maybe switch XShmPutImage since it's async. 80 // TODO(skaslev): Maybe switch XShmPutImage since it's async.
81 XPutImage(display_, compositor_->widget(), gc_, image_, 81 XPutImage(display_, compositor_->widget(), gc_, image_,
82 rect.x(), rect.y(), 82 rect.x(), rect.y(),
83 rect.x(), rect.y(), 83 rect.x(), rect.y(),
84 rect.width(), rect.height()); 84 rect.width(), rect.height());
85 } 85 }
86 86
87 } // namespace content 87 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/aura/software_output_device_x11.h ('k') | content/browser/power_save_blocker_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698