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

Side by Side Diff: media/gpu/vaapi_tfp_picture.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 | « media/gpu/vaapi_drm_picture.cc ('k') | media/gpu/vaapi_video_decode_accelerator.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/gpu/vaapi_tfp_picture.h" 5 #include "media/gpu/vaapi_tfp_picture.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 #include "media/gpu/va_surface.h" 9 #include "media/gpu/va_surface.h"
10 #include "media/gpu/vaapi_wrapper.h" 10 #include "media/gpu/vaapi_wrapper.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 if (!make_context_current_cb_.Run()) 51 if (!make_context_current_cb_.Run())
52 return false; 52 return false;
53 53
54 glx_image_ = new gl::GLImageGLX(size_, GL_RGB); 54 glx_image_ = new gl::GLImageGLX(size_, GL_RGB);
55 if (!glx_image_->Initialize(x_pixmap_)) { 55 if (!glx_image_->Initialize(x_pixmap_)) {
56 // x_pixmap_ will be freed in the destructor. 56 // x_pixmap_ will be freed in the destructor.
57 LOG(ERROR) << "Failed creating a GLX Pixmap for TFP"; 57 LOG(ERROR) << "Failed creating a GLX Pixmap for TFP";
58 return false; 58 return false;
59 } 59 }
60 60
61 gfx::ScopedTextureBinder texture_binder(GL_TEXTURE_2D, texture_id_); 61 gl::ScopedTextureBinder texture_binder(GL_TEXTURE_2D, texture_id_);
62 if (!glx_image_->BindTexImage(GL_TEXTURE_2D)) { 62 if (!glx_image_->BindTexImage(GL_TEXTURE_2D)) {
63 LOG(ERROR) << "Failed to bind texture to glx image"; 63 LOG(ERROR) << "Failed to bind texture to glx image";
64 return false; 64 return false;
65 } 65 }
66 } 66 }
67 67
68 return true; 68 return true;
69 } 69 }
70 70
71 bool VaapiTFPPicture::Allocate(gfx::BufferFormat format) { 71 bool VaapiTFPPicture::Allocate(gfx::BufferFormat format) {
(...skipping 25 matching lines...) Expand all
97 return false; 97 return false;
98 } 98 }
99 99
100 bool VaapiTFPPicture::DownloadFromSurface( 100 bool VaapiTFPPicture::DownloadFromSurface(
101 const scoped_refptr<VASurface>& va_surface) { 101 const scoped_refptr<VASurface>& va_surface) {
102 return vaapi_wrapper_->PutSurfaceIntoPixmap(va_surface->id(), x_pixmap_, 102 return vaapi_wrapper_->PutSurfaceIntoPixmap(va_surface->id(), x_pixmap_,
103 va_surface->size()); 103 va_surface->size());
104 } 104 }
105 105
106 } // namespace media 106 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/vaapi_drm_picture.cc ('k') | media/gpu/vaapi_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698