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

Side by Side Diff: media/gpu/vaapi_drm_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, 7 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/v4l2_video_decode_accelerator.cc ('k') | media/gpu/vaapi_tfp_picture.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 "base/file_descriptor_posix.h" 5 #include "base/file_descriptor_posix.h"
6 #include "media/gpu/va_surface.h" 6 #include "media/gpu/va_surface.h"
7 #include "media/gpu/vaapi_drm_picture.h" 7 #include "media/gpu/vaapi_drm_picture.h"
8 #include "media/gpu/vaapi_wrapper.h" 8 #include "media/gpu/vaapi_wrapper.h"
9 #include "third_party/libva/va/drm/va_drm.h" 9 #include "third_party/libva/va/drm/va_drm.h"
10 #include "third_party/libva/va/va.h" 10 #include "third_party/libva/va/va.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return false; 52 return false;
53 } 53 }
54 54
55 pixmap_->SetProcessingCallback( 55 pixmap_->SetProcessingCallback(
56 base::Bind(&VaapiWrapper::ProcessPixmap, vaapi_wrapper_)); 56 base::Bind(&VaapiWrapper::ProcessPixmap, vaapi_wrapper_));
57 57
58 if (texture_id_ != 0 && !make_context_current_cb_.is_null()) { 58 if (texture_id_ != 0 && !make_context_current_cb_.is_null()) {
59 if (!make_context_current_cb_.Run()) 59 if (!make_context_current_cb_.Run())
60 return false; 60 return false;
61 61
62 gfx::ScopedTextureBinder texture_binder(GL_TEXTURE_EXTERNAL_OES, 62 gl::ScopedTextureBinder texture_binder(GL_TEXTURE_EXTERNAL_OES,
63 texture_id_); 63 texture_id_);
64 scoped_refptr<gfx::GLImageOzoneNativePixmap> image( 64 scoped_refptr<gl::GLImageOzoneNativePixmap> image(
65 new gfx::GLImageOzoneNativePixmap(size_, GL_BGRA_EXT)); 65 new gl::GLImageOzoneNativePixmap(size_, GL_BGRA_EXT));
66 if (!image->Initialize(pixmap_.get(), pixmap_->GetBufferFormat())) { 66 if (!image->Initialize(pixmap_.get(), pixmap_->GetBufferFormat())) {
67 LOG(ERROR) << "Failed to create GLImage"; 67 LOG(ERROR) << "Failed to create GLImage";
68 return false; 68 return false;
69 } 69 }
70 gl_image_ = image; 70 gl_image_ = image;
71 if (!gl_image_->BindTexImage(GL_TEXTURE_EXTERNAL_OES)) { 71 if (!gl_image_->BindTexImage(GL_TEXTURE_EXTERNAL_OES)) {
72 LOG(ERROR) << "Failed to bind texture to GLImage"; 72 LOG(ERROR) << "Failed to bind texture to GLImage";
73 return false; 73 return false;
74 } 74 }
75 } 75 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool VaapiDrmPicture::DownloadFromSurface( 117 bool VaapiDrmPicture::DownloadFromSurface(
118 const scoped_refptr<VASurface>& va_surface) { 118 const scoped_refptr<VASurface>& va_surface) {
119 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_); 119 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_);
120 } 120 }
121 121
122 bool VaapiDrmPicture::AllowOverlay() const { 122 bool VaapiDrmPicture::AllowOverlay() const {
123 return true; 123 return true;
124 } 124 }
125 125
126 } // namespace media 126 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/v4l2_video_decode_accelerator.cc ('k') | media/gpu/vaapi_tfp_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698