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

Side by Side Diff: cc/layers/texture_layer_impl_unittest.cc

Issue 1930193002: cc: Add GpuMemoryBufferHandle to TextureMailbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix exo 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
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 "cc/layers/texture_layer_impl.h" 5 #include "cc/layers/texture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/output/context_provider.h" 9 #include "cc/output/context_provider.h"
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 LayerTestCommon::LayerImplTest impl; 110 LayerTestCommon::LayerImplTest impl;
111 111
112 gpu::Mailbox mailbox; 112 gpu::Mailbox mailbox;
113 impl.output_surface()->context_provider()->ContextGL()->GenMailboxCHROMIUM( 113 impl.output_surface()->context_provider()->ContextGL()->GenMailboxCHROMIUM(
114 mailbox.name); 114 mailbox.name);
115 TextureMailbox texture_mailbox( 115 TextureMailbox texture_mailbox(
116 mailbox, 116 mailbox,
117 gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO, 0x123, 117 gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO, 0x123,
118 gpu::CommandBufferId::FromUnsafeValue(0x234), 0x456), 118 gpu::CommandBufferId::FromUnsafeValue(0x234), 0x456),
119 GL_TEXTURE_2D, layer_size, false, true); 119 GL_TEXTURE_2D, layer_size, gfx::GpuMemoryBufferHandle(), false, true);
120 120
121 TextureLayerImpl* texture_layer_impl = 121 TextureLayerImpl* texture_layer_impl =
122 impl.AddChildToRoot<TextureLayerImpl>(); 122 impl.AddChildToRoot<TextureLayerImpl>();
123 texture_layer_impl->SetBounds(layer_size); 123 texture_layer_impl->SetBounds(layer_size);
124 texture_layer_impl->SetDrawsContent(true); 124 texture_layer_impl->SetDrawsContent(true);
125 texture_layer_impl->SetTextureMailbox( 125 texture_layer_impl->SetTextureMailbox(
126 texture_mailbox, 126 texture_mailbox,
127 SingleReleaseCallbackImpl::Create(base::Bind(&IgnoreCallback))); 127 SingleReleaseCallbackImpl::Create(base::Bind(&IgnoreCallback)));
128 128
129 impl.CalcDrawProps(viewport_size); 129 impl.CalcDrawProps(viewport_size);
(...skipping 24 matching lines...) Expand all
154 impl.AppendQuadsWithOcclusion(texture_layer_impl, occluded); 154 impl.AppendQuadsWithOcclusion(texture_layer_impl, occluded);
155 155
156 EXPECT_EQ(1u, impl.quad_list().size()); 156 EXPECT_EQ(1u, impl.quad_list().size());
157 EXPECT_EQ(DrawQuad::Material::SOLID_COLOR, 157 EXPECT_EQ(DrawQuad::Material::SOLID_COLOR,
158 impl.quad_list().front()->material); 158 impl.quad_list().front()->material);
159 } 159 }
160 } 160 }
161 161
162 } // namespace 162 } // namespace
163 } // namespace cc 163 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698