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

Side by Side Diff: ui/gl/gl_image_glx.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
« no previous file with comments | « ui/gl/gl_image_egl.cc ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } // namespace 101 } // namespace
102 102
103 GLImageGLX::GLImageGLX(const gfx::Size& size, unsigned internalformat) 103 GLImageGLX::GLImageGLX(const gfx::Size& size, unsigned internalformat)
104 : glx_pixmap_(0), size_(size), internalformat_(internalformat) {} 104 : glx_pixmap_(0), size_(size), internalformat_(internalformat) {}
105 105
106 GLImageGLX::~GLImageGLX() { 106 GLImageGLX::~GLImageGLX() {
107 DCHECK_EQ(0u, glx_pixmap_); 107 DCHECK_EQ(0u, glx_pixmap_);
108 } 108 }
109 109
110 bool GLImageGLX::Initialize(XID pixmap) { 110 bool GLImageGLX::Initialize(XID pixmap) {
111 if (!gfx::GLSurfaceGLX::IsTextureFromPixmapSupported()) { 111 if (!gl::GLSurfaceGLX::IsTextureFromPixmapSupported()) {
112 DVLOG(0) << "GLX_EXT_texture_from_pixmap not supported."; 112 DVLOG(0) << "GLX_EXT_texture_from_pixmap not supported.";
113 return false; 113 return false;
114 } 114 }
115 115
116 if (!ValidFormat(internalformat_)) { 116 if (!ValidFormat(internalformat_)) {
117 DVLOG(0) << "Invalid format: " << internalformat_; 117 DVLOG(0) << "Invalid format: " << internalformat_;
118 return false; 118 return false;
119 } 119 }
120 120
121 DCHECK_EQ(PixmapDepth(internalformat_), ActualPixmapDepth(pixmap)); 121 DCHECK_EQ(PixmapDepth(internalformat_), ActualPixmapDepth(pixmap));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return false; 202 return false;
203 } 203 }
204 204
205 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 205 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
206 uint64_t process_tracing_id, 206 uint64_t process_tracing_id,
207 const std::string& dump_name) { 207 const std::string& dump_name) {
208 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 208 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
209 } 209 }
210 210
211 } // namespace gl 211 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_image_egl.cc ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698