Chromium Code Reviews| Index: cc/resources/resource_provider.h |
| diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h |
| index 5a828b1197442f5a7f85698606332e5da6142311..ada9526befbae7f8879a262dade7b727f73a3cea 100644 |
| --- a/cc/resources/resource_provider.h |
| +++ b/cc/resources/resource_provider.h |
| @@ -153,14 +153,6 @@ class CC_EXPORT ResourceProvider { |
| void ReleaseCachedData(); |
| base::TimeTicks EstimatedUploadCompletionTime(size_t uploads_per_tick); |
| - // Flush all context operations, kicking uploads and ensuring ordering with |
| - // respect to other contexts. |
| - void Flush(); |
| - |
| - // Finish all context operations, causing any pending callbacks to be |
| - // scheduled. |
| - void Finish(); |
| - |
| // Only flush the command buffer if supported. |
| // Returns true if the shallow flush occurred, false otherwise. |
| bool ShallowFlushIfSupported(); |
| @@ -306,20 +298,6 @@ class CC_EXPORT ResourceProvider { |
| DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockSoftware); |
| }; |
| - // The following class is needed to modify GL resources using GPU |
| - // raster. The user must ensure that they only use GPU raster on |
| - // GL resources while an instance of this class is alive. |
| - class CC_EXPORT ScopedGpuRaster { |
| - public: |
| - ScopedGpuRaster(ResourceProvider* resource_provider); |
| - ~ScopedGpuRaster(); |
| - |
| - private: |
| - ResourceProvider* resource_provider_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(ScopedGpuRaster); |
| - }; |
| - |
| class Fence : public base::RefCounted<Fence> { |
| public: |
| Fence() {} |
| @@ -388,6 +366,10 @@ class CC_EXPORT ResourceProvider { |
| static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); |
| + // Returns NULL if the output_surface_ does not have a ContextProvider. |
| + gpu::gles2::GLES2Interface* ContextGL() const; |
| + class GrContext* GrContext() const; |
| + |
| private: |
| class GpuRasterBuffer; |
| class ImageRasterBuffer; |
| @@ -637,13 +619,6 @@ class CC_EXPORT ResourceProvider { |
| GLenum unit, |
| GLenum filter); |
| - // Returns NULL if the output_surface_ does not have a ContextProvider. |
| - gpu::gles2::GLES2Interface* ContextGL() const; |
| - class GrContext* GrContext() const; |
| - |
| - void BeginGpuRaster(); |
| - void EndGpuRaster(); |
| - |
| OutputSurface* output_surface_; |
| SharedBitmapManager* shared_bitmap_manager_; |
| bool lost_output_surface_; |
| @@ -677,6 +652,22 @@ class CC_EXPORT ResourceProvider { |
| DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| }; |
| +// The following class is needed to modify GL resources using GPU |
| +// raster. The user must ensure that they only use GPU raster on |
| +// GL resources while an instance of this class is alive. |
| +class CC_EXPORT ScopedGpuRaster { |
|
danakj
2014/07/10 17:01:44
move to its own file, 1 class per file
sohanjg
2014/07/11 16:43:32
Done.
|
| + public: |
| + ScopedGpuRaster(ResourceProvider* resource_provider); |
| + ~ScopedGpuRaster(); |
| + |
| + private: |
| + void BeginGpuRaster(); |
| + void EndGpuRaster(); |
| + |
| + ResourceProvider* resource_provider_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ScopedGpuRaster); |
| +}; |
| // TODO(epenner): Move these format conversions to resource_format.h |
| // once that builds on mac (npapi.h currently #includes OpenGL.h). |