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

Side by Side Diff: media/gpu/vaapi_drm_picture.cc

Issue 2768343002: Change namespace from ui to gfx for NativePixmap related code (Closed)
Patch Set: Addressed sadrul's remark Created 3 years, 9 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.h ('k') | media/gpu/vaapi_wrapper.h » ('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_drm_picture.h" 5 #include "media/gpu/vaapi_drm_picture.h"
6 6
7 #include "base/file_descriptor_posix.h" 7 #include "base/file_descriptor_posix.h"
8 #include "media/gpu/va_surface.h" 8 #include "media/gpu/va_surface.h"
9 #include "media/gpu/vaapi_wrapper.h" 9 #include "media/gpu/vaapi_wrapper.h"
10 #include "third_party/libva/va/drm/va_drm.h" 10 #include "third_party/libva/va/drm/va_drm.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 if (texture_id_ != 0 && !make_context_current_cb_.is_null()) { 71 if (texture_id_ != 0 && !make_context_current_cb_.is_null()) {
72 if (!make_context_current_cb_.Run()) 72 if (!make_context_current_cb_.Run())
73 return false; 73 return false;
74 74
75 gl::ScopedTextureBinder texture_binder(GL_TEXTURE_EXTERNAL_OES, 75 gl::ScopedTextureBinder texture_binder(GL_TEXTURE_EXTERNAL_OES,
76 texture_id_); 76 texture_id_);
77 77
78 gfx::BufferFormat format = pixmap_->GetBufferFormat(); 78 gfx::BufferFormat format = pixmap_->GetBufferFormat();
79 79
80 scoped_refptr<ui::GLImageNativePixmap> image(new ui::GLImageNativePixmap( 80 scoped_refptr<gl::GLImageNativePixmap> image(new gl::GLImageNativePixmap(
81 size_, BufferFormatToInternalFormat(format))); 81 size_, BufferFormatToInternalFormat(format)));
82 if (!image->Initialize(pixmap_.get(), format)) { 82 if (!image->Initialize(pixmap_.get(), format)) {
83 LOG(ERROR) << "Failed to create GLImage"; 83 LOG(ERROR) << "Failed to create GLImage";
84 return false; 84 return false;
85 } 85 }
86 gl_image_ = image; 86 gl_image_ = image;
87 if (!gl_image_->BindTexImage(GL_TEXTURE_EXTERNAL_OES)) { 87 if (!gl_image_->BindTexImage(GL_TEXTURE_EXTERNAL_OES)) {
88 LOG(ERROR) << "Failed to bind texture to GLImage"; 88 LOG(ERROR) << "Failed to bind texture to GLImage";
89 return false; 89 return false;
90 } 90 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool VaapiDrmPicture::DownloadFromSurface( 134 bool VaapiDrmPicture::DownloadFromSurface(
135 const scoped_refptr<VASurface>& va_surface) { 135 const scoped_refptr<VASurface>& va_surface) {
136 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_); 136 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_);
137 } 137 }
138 138
139 bool VaapiDrmPicture::AllowOverlay() const { 139 bool VaapiDrmPicture::AllowOverlay() const {
140 return true; 140 return true;
141 } 141 }
142 142
143 } // namespace media 143 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/vaapi_drm_picture.h ('k') | media/gpu/vaapi_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698