| 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 = TextureMailbox( | 200 TextureMailbox mailbox = |
| 201 gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, size, | 201 TextureMailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, |
| 202 gfx::GpuMemoryBufferId(), is_overlay_candidate, false); | 202 size, 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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 | 1639 |
| 1640 ReturnResourceInUseQuery(resource2); | 1640 ReturnResourceInUseQuery(resource2); |
| 1641 ReturnResourceInUseQuery(resource3); | 1641 ReturnResourceInUseQuery(resource3); |
| 1642 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 1642 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
| 1643 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); | 1643 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); |
| 1644 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); | 1644 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); |
| 1645 } | 1645 } |
| 1646 | 1646 |
| 1647 } // namespace | 1647 } // namespace |
| 1648 } // namespace cc | 1648 } // namespace cc |
| OLD | NEW |