| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |