| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 has_transparent_background); | 190 has_transparent_background); |
| 191 | 191 |
| 192 SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState(); | 192 SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState(); |
| 193 shared_state->opacity = 1.f; | 193 shared_state->opacity = 1.f; |
| 194 return pass; | 194 return pass; |
| 195 } | 195 } |
| 196 | 196 |
| 197 ResourceId CreateResource(ResourceProvider* resource_provider, | 197 ResourceId CreateResource(ResourceProvider* resource_provider, |
| 198 const gfx::Size& size, | 198 const gfx::Size& size, |
| 199 bool is_overlay_candidate) { | 199 bool is_overlay_candidate) { |
| 200 TextureMailbox mailbox = | 200 TextureMailbox mailbox = TextureMailbox( |
| 201 TextureMailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, | 201 gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, size, |
| 202 size, is_overlay_candidate, false); | 202 gfx::GpuMemoryBufferHandle(), is_overlay_candidate, false); |
| 203 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = | 203 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = |
| 204 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); | 204 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); |
| 205 | 205 |
| 206 return resource_provider->CreateResourceFromTextureMailbox( | 206 return resource_provider->CreateResourceFromTextureMailbox( |
| 207 mailbox, std::move(release_callback)); | 207 mailbox, std::move(release_callback)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 SolidColorDrawQuad* CreateSolidColorQuadAt( | 210 SolidColorDrawQuad* CreateSolidColorQuadAt( |
| 211 const SharedQuadState* shared_quad_state, | 211 const SharedQuadState* shared_quad_state, |
| 212 SkColor color, | 212 SkColor color, |
| (...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 | 1630 |
| 1631 // This completion corresponds to the third frame. | 1631 // This completion corresponds to the third frame. |
| 1632 SwapBuffersComplete(); | 1632 SwapBuffersComplete(); |
| 1633 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 1633 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
| 1634 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); | 1634 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); |
| 1635 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); | 1635 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 } // namespace | 1638 } // namespace |
| 1639 } // namespace cc | 1639 } // namespace cc |
| OLD | NEW |