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 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_ |
6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ | 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "cc/resources/texture_mailbox.h" | 35 #include "cc/resources/texture_mailbox.h" |
36 #include "cc/resources/transferable_resource.h" | 36 #include "cc/resources/transferable_resource.h" |
37 #include "third_party/khronos/GLES2/gl2.h" | 37 #include "third_party/khronos/GLES2/gl2.h" |
38 #include "third_party/khronos/GLES2/gl2ext.h" | 38 #include "third_party/khronos/GLES2/gl2ext.h" |
39 #include "third_party/skia/include/core/SkBitmap.h" | 39 #include "third_party/skia/include/core/SkBitmap.h" |
40 #include "third_party/skia/include/core/SkCanvas.h" | 40 #include "third_party/skia/include/core/SkCanvas.h" |
41 #include "ui/gfx/geometry/size.h" | 41 #include "ui/gfx/geometry/size.h" |
42 #include "ui/gfx/gpu_memory_buffer.h" | 42 #include "ui/gfx/gpu_memory_buffer.h" |
43 | 43 |
44 class GrContext; | 44 class GrContext; |
| 45 class GrSurface; |
45 | 46 |
46 namespace gpu { | 47 namespace gpu { |
47 class GpuMemoryBufferManager; | 48 class GpuMemoryBufferManager; |
48 namespace gles { | 49 namespace gles { |
49 class GLES2Interface; | 50 class GLES2Interface; |
50 } | 51 } |
51 } | 52 } |
52 | 53 |
53 namespace gfx { | 54 namespace gfx { |
54 class Rect; | 55 class Rect; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 345 |
345 void UpdateResourceSyncToken(const gpu::SyncToken& sync_token) const { | 346 void UpdateResourceSyncToken(const gpu::SyncToken& sync_token) const { |
346 resource_->mailbox.set_sync_token(sync_token); | 347 resource_->mailbox.set_sync_token(sync_token); |
347 } | 348 } |
348 | 349 |
349 private: | 350 private: |
350 ResourceProvider* resource_provider_; | 351 ResourceProvider* resource_provider_; |
351 ResourceProvider::Resource* resource_; | 352 ResourceProvider::Resource* resource_; |
352 base::ThreadChecker thread_checker_; | 353 base::ThreadChecker thread_checker_; |
353 skia::RefPtr<SkSurface> sk_surface_; | 354 skia::RefPtr<SkSurface> sk_surface_; |
| 355 skia::RefPtr<GrSurface> gr_surface_; |
354 | 356 |
355 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGr); | 357 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGr); |
356 }; | 358 }; |
357 | 359 |
358 class Fence : public base::RefCounted<Fence> { | 360 class Fence : public base::RefCounted<Fence> { |
359 public: | 361 public: |
360 Fence() {} | 362 Fence() {} |
361 | 363 |
362 virtual void Set() = 0; | 364 virtual void Set() = 0; |
363 virtual bool HasPassed() = 0; | 365 virtual bool HasPassed() = 0; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 // A process-unique ID used for disambiguating memory dumps from different | 624 // A process-unique ID used for disambiguating memory dumps from different |
623 // resource providers. | 625 // resource providers. |
624 int tracing_id_; | 626 int tracing_id_; |
625 | 627 |
626 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 628 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
627 }; | 629 }; |
628 | 630 |
629 } // namespace cc | 631 } // namespace cc |
630 | 632 |
631 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 633 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |