Index: cc/resources/scoped_gpu_raster.h |
diff --git a/cc/resources/scoped_gpu_raster.h b/cc/resources/scoped_gpu_raster.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..182c67d173280a6ca502c61ebbdf52e283bfe8bd |
--- /dev/null |
+++ b/cc/resources/scoped_gpu_raster.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
danakj
2014/07/11 17:39:59
2014
sohanjg
2014/07/12 11:08:26
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_RESOURCES_SCOPED_GPU_RASTER_H_ |
+#define CC_RESOURCES_SCOPED_GPU_RASTER_H_ |
+ |
+#include "base/logging.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "cc/base/cc_export.h" |
+#include "cc/output/context_provider.h" |
+ |
+namespace cc { |
+ |
+// 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(ContextProvider* context_provider); |
+ ~ScopedGpuRaster(); |
+ |
+ private: |
+ void BeginGpuRaster(); |
+ void EndGpuRaster(); |
+ |
+ ContextProvider* context_provider_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ScopedGpuRaster); |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_RESOURCES_SCOPED_GPU_RASTER_H_ |