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

Side by Side Diff: content/common/gpu/client/gl_helper.cc

Issue 188633002: Query the preferred readback config in CopyFromBackingStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 #include "content/common/gpu/client/gl_helper.h" 5 #include "content/common/gpu/client/gl_helper.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 base::Bind(&CallbackKeepingVideoFrameAlive, target, callback)); 1146 base::Bind(&CallbackKeepingVideoFrameAlive, target, callback));
1147 gl_->BindFramebuffer(GL_FRAMEBUFFER, 0); 1147 gl_->BindFramebuffer(GL_FRAMEBUFFER, 0);
1148 media::LetterboxYUV(target, dst_subrect_); 1148 media::LetterboxYUV(target, dst_subrect_);
1149 } 1149 }
1150 1150
1151 bool GLHelper::IsReadbackConfigSupported(SkBitmap::Config texture_format) { 1151 bool GLHelper::IsReadbackConfigSupported(SkBitmap::Config texture_format) {
1152 DCHECK(readback_support_.get()); 1152 DCHECK(readback_support_.get());
1153 return readback_support_.get()->IsReadbackConfigSupported(texture_format); 1153 return readback_support_.get()->IsReadbackConfigSupported(texture_format);
1154 } 1154 }
1155 1155
1156 SkBitmap::Config GLHelper::PreferredReadbackFormat() {
1157 DCHECK(readback_support_.get());
1158 return readback_support_.get()->PreferredReadbackFormat();
1159 }
1160
1156 ReadbackYUVInterface* GLHelper::CopyTextureToImpl::CreateReadbackPipelineYUV( 1161 ReadbackYUVInterface* GLHelper::CopyTextureToImpl::CreateReadbackPipelineYUV(
1157 GLHelper::ScalerQuality quality, 1162 GLHelper::ScalerQuality quality,
1158 const gfx::Size& src_size, 1163 const gfx::Size& src_size,
1159 const gfx::Rect& src_subrect, 1164 const gfx::Rect& src_subrect,
1160 const gfx::Size& dst_size, 1165 const gfx::Size& dst_size,
1161 const gfx::Rect& dst_subrect, 1166 const gfx::Rect& dst_subrect,
1162 bool flip_vertically, 1167 bool flip_vertically,
1163 bool use_mrt) { 1168 bool use_mrt) {
1164 helper_->InitScalerImpl(); 1169 helper_->InitScalerImpl();
1165 if (max_draw_buffers_ >= 2 && use_mrt) { 1170 if (max_draw_buffers_ >= 2 && use_mrt) {
(...skipping 30 matching lines...) Expand all
1196 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality, 1201 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality,
1197 src_size, 1202 src_size,
1198 src_subrect, 1203 src_subrect,
1199 dst_size, 1204 dst_size,
1200 dst_subrect, 1205 dst_subrect,
1201 flip_vertically, 1206 flip_vertically,
1202 use_mrt); 1207 use_mrt);
1203 } 1208 }
1204 1209
1205 } // namespace content 1210 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698