OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/resource_provider.h" | 5 #include "cc/resources/resource_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | |
8 #include <map> | 9 #include <map> |
9 #include <set> | 10 #include <set> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/bind.h" | 13 #include "base/bind.h" |
13 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
14 #include "base/logging.h" | 15 #include "base/logging.h" |
15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
16 #include "cc/base/scoped_ptr_deque.h" | |
17 #include "cc/output/output_surface.h" | 17 #include "cc/output/output_surface.h" |
18 #include "cc/resources/returned_resource.h" | 18 #include "cc/resources/returned_resource.h" |
19 #include "cc/resources/shared_bitmap_manager.h" | 19 #include "cc/resources/shared_bitmap_manager.h" |
20 #include "cc/resources/single_release_callback.h" | 20 #include "cc/resources/single_release_callback.h" |
21 #include "cc/test/fake_output_surface.h" | 21 #include "cc/test/fake_output_surface.h" |
22 #include "cc/test/fake_output_surface_client.h" | 22 #include "cc/test/fake_output_surface_client.h" |
23 #include "cc/test/test_gpu_memory_buffer_manager.h" | 23 #include "cc/test/test_gpu_memory_buffer_manager.h" |
24 #include "cc/test/test_shared_bitmap_manager.h" | 24 #include "cc/test/test_shared_bitmap_manager.h" |
25 #include "cc/test/test_texture.h" | 25 #include "cc/test/test_texture.h" |
26 #include "cc/test/test_web_graphics_context_3d.h" | 26 #include "cc/test/test_web_graphics_context_3d.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 memcpy(dest, src, in_pitch); | 350 memcpy(dest, src, in_pitch); |
351 dest += out_pitch; | 351 dest += out_pitch; |
352 src += in_pitch; | 352 src += in_pitch; |
353 } | 353 } |
354 } | 354 } |
355 | 355 |
356 struct PendingProduceTexture { | 356 struct PendingProduceTexture { |
357 GLbyte mailbox[GL_MAILBOX_SIZE_CHROMIUM]; | 357 GLbyte mailbox[GL_MAILBOX_SIZE_CHROMIUM]; |
358 scoped_refptr<TestTexture> texture; | 358 scoped_refptr<TestTexture> texture; |
359 }; | 359 }; |
360 typedef ScopedPtrDeque<PendingProduceTexture> PendingProduceTextureList; | 360 typedef std::deque<scoped_ptr<PendingProduceTexture>> |
danakj
2015/11/13 19:54:02
nit: using instead of typedef
but probably kill t
vmpstr
2015/11/13 23:15:38
Done.
| |
361 PendingProduceTextureList; | |
361 ContextSharedData* shared_data_; | 362 ContextSharedData* shared_data_; |
362 gpu::SyncToken last_waited_sync_token_; | 363 gpu::SyncToken last_waited_sync_token_; |
363 PendingProduceTextureList pending_produce_textures_; | 364 PendingProduceTextureList pending_produce_textures_; |
364 }; | 365 }; |
365 | 366 |
366 void GetResourcePixels(ResourceProvider* resource_provider, | 367 void GetResourcePixels(ResourceProvider* resource_provider, |
367 ResourceProviderContext* context, | 368 ResourceProviderContext* context, |
368 ResourceId id, | 369 ResourceId id, |
369 const gfx::Size& size, | 370 const gfx::Size& size, |
370 ResourceFormat format, | 371 ResourceFormat format, |
(...skipping 3184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3555 resource_provider->AllocateForTesting(id); | 3556 resource_provider->AllocateForTesting(id); |
3556 Mock::VerifyAndClearExpectations(context); | 3557 Mock::VerifyAndClearExpectations(context); |
3557 | 3558 |
3558 DCHECK_EQ(10u, context->PeekTextureId()); | 3559 DCHECK_EQ(10u, context->PeekTextureId()); |
3559 resource_provider->DeleteResource(id); | 3560 resource_provider->DeleteResource(id); |
3560 } | 3561 } |
3561 } | 3562 } |
3562 | 3563 |
3563 } // namespace | 3564 } // namespace |
3564 } // namespace cc | 3565 } // namespace cc |
OLD | NEW |