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

Side by Side Diff: cc/resources/video_resource_updater.cc

Issue 2610853005: Modify Copy{Sub}TextureCHROMIUM entry point to add level argument (Closed)
Patch Set: fix chromeos Created 3 years, 11 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 | « cc/raster/one_copy_raster_buffer_provider.cc ('k') | components/exo/buffer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 706
707 ResourceProvider::ScopedWriteLockGL lock(resource_provider_, 707 ResourceProvider::ScopedWriteLockGL lock(resource_provider_,
708 resource->resource_id(), false); 708 resource->resource_id(), false);
709 DCHECK_EQ( 709 DCHECK_EQ(
710 resource_provider_->GetResourceTextureTarget(resource->resource_id()), 710 resource_provider_->GetResourceTextureTarget(resource->resource_id()),
711 (GLenum)GL_TEXTURE_2D); 711 (GLenum)GL_TEXTURE_2D);
712 712
713 gl->WaitSyncTokenCHROMIUM(mailbox_holder.sync_token.GetConstData()); 713 gl->WaitSyncTokenCHROMIUM(mailbox_holder.sync_token.GetConstData());
714 uint32_t src_texture_id = gl->CreateAndConsumeTextureCHROMIUM( 714 uint32_t src_texture_id = gl->CreateAndConsumeTextureCHROMIUM(
715 mailbox_holder.texture_target, mailbox_holder.mailbox.name); 715 mailbox_holder.texture_target, mailbox_holder.mailbox.name);
716 gl->CopySubTextureCHROMIUM(src_texture_id, lock.texture_id(), 0, 0, 0, 0, 716 gl->CopySubTextureCHROMIUM(src_texture_id, 0, lock.texture_id(), 0, 0, 0, 0,
717 output_plane_resource_size.width(), 717 0, output_plane_resource_size.width(),
718 output_plane_resource_size.height(), false, false, 718 output_plane_resource_size.height(), false, false,
719 false); 719 false);
720 gl->DeleteTextures(1, &src_texture_id); 720 gl->DeleteTextures(1, &src_texture_id);
721 721
722 // Done with the source video frame texture at this point. 722 // Done with the source video frame texture at this point.
723 video_frame->UpdateReleaseSyncToken(&client); 723 video_frame->UpdateReleaseSyncToken(&client);
724 724
725 // VideoResourceUpdater shares a context with the compositor so a 725 // VideoResourceUpdater shares a context with the compositor so a
726 // sync token is not required. 726 // sync token is not required.
727 TextureMailbox mailbox(resource->mailbox(), gpu::SyncToken(), GL_TEXTURE_2D, 727 TextureMailbox mailbox(resource->mailbox(), gpu::SyncToken(), GL_TEXTURE_2D,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 if (lost_resource) { 812 if (lost_resource) {
813 resource_it->clear_refs(); 813 resource_it->clear_refs();
814 updater->DeleteResource(resource_it); 814 updater->DeleteResource(resource_it);
815 return; 815 return;
816 } 816 }
817 817
818 resource_it->remove_ref(); 818 resource_it->remove_ref();
819 } 819 }
820 820
821 } // namespace cc 821 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/one_copy_raster_buffer_provider.cc ('k') | components/exo/buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698