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

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

Issue 2208733002: Command buffer: clear rect for a specific layer/level of the uncleared texture for CopyTexSubImage3D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not assign a default value 0 to layer, UpdateMipCleared for all layers for 3D texture Created 4 years, 4 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 | « gpu/ipc/service/stream_texture_android.cc ('k') | media/gpu/avda_codec_image.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android_deferred_rendering_backing_strategy.h" 5 #include "media/gpu/android_deferred_rendering_backing_strategy.h"
6 6
7 #include <EGL/egl.h> 7 #include <EGL/egl.h>
8 #include <EGL/eglext.h> 8 #include <EGL/eglext.h>
9 9
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // implementation will call CopyTexImage, which is where AVDACodecImage 144 // implementation will call CopyTexImage, which is where AVDACodecImage
145 // updates the SurfaceTexture to the right frame. 145 // updates the SurfaceTexture to the right frame.
146 auto image_state = gpu::gles2::Texture::UNBOUND; 146 auto image_state = gpu::gles2::Texture::UNBOUND;
147 // For SurfaceView we set the state to BOUND because ScheduleOverlayPlane 147 // For SurfaceView we set the state to BOUND because ScheduleOverlayPlane
148 // requires it. If something tries to sample from this texture it won't work, 148 // requires it. If something tries to sample from this texture it won't work,
149 // but there's no way to sample from a SurfaceView anyway, so it doesn't 149 // but there's no way to sample from a SurfaceView anyway, so it doesn't
150 // matter. 150 // matter.
151 if (image && !surface_texture_) 151 if (image && !surface_texture_)
152 image_state = gpu::gles2::Texture::BOUND; 152 image_state = gpu::gles2::Texture::BOUND;
153 texture_manager->SetLevelStreamTextureImage(texture_ref, GetTextureTarget(), 153 texture_manager->SetLevelStreamTextureImage(texture_ref, GetTextureTarget(),
154 0, image.get(), image_state, 154 0, 0, image.get(), image_state,
155 stream_texture_service_id); 155 stream_texture_service_id);
156 } 156 }
157 157
158 void AndroidDeferredRenderingBackingStrategy::UseCodecBufferForPictureBuffer( 158 void AndroidDeferredRenderingBackingStrategy::UseCodecBufferForPictureBuffer(
159 int32_t codec_buf_index, 159 int32_t codec_buf_index,
160 const PictureBuffer& picture_buffer) { 160 const PictureBuffer& picture_buffer) {
161 // Make sure that the decoder is available. 161 // Make sure that the decoder is available.
162 RETURN_IF_NULL(state_provider_->GetGlDecoder()); 162 RETURN_IF_NULL(state_provider_->GetGlDecoder());
163 163
164 // Notify the AVDACodecImage for picture_buffer that it should use the 164 // Notify the AVDACodecImage for picture_buffer that it should use the
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 void AndroidDeferredRenderingBackingStrategy::UpdatePictureBufferSize( 306 void AndroidDeferredRenderingBackingStrategy::UpdatePictureBufferSize(
307 PictureBuffer* picture_buffer, 307 PictureBuffer* picture_buffer,
308 const gfx::Size& new_size) { 308 const gfx::Size& new_size) {
309 // This strategy uses EGL images which manage the texture size for us. We 309 // This strategy uses EGL images which manage the texture size for us. We
310 // simply update the PictureBuffer meta-data and leave the texture as-is. 310 // simply update the PictureBuffer meta-data and leave the texture as-is.
311 picture_buffer->set_size(new_size); 311 picture_buffer->set_size(new_size);
312 } 312 }
313 313
314 } // namespace media 314 } // namespace media
OLDNEW
« no previous file with comments | « gpu/ipc/service/stream_texture_android.cc ('k') | media/gpu/avda_codec_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698