scoped_ui_graphics_push_context_ios.h 761 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_GFX_SCOPED_UI_GRAPHICS_PUSH_CONTEXT_IOS_H_
  5. #define UI_GFX_SCOPED_UI_GRAPHICS_PUSH_CONTEXT_IOS_H_
  6. #import <QuartzCore/QuartzCore.h>
  7. namespace gfx {
  8. class ScopedUIGraphicsPushContext {
  9. public:
  10. explicit ScopedUIGraphicsPushContext(CGContextRef context);
  11. ScopedUIGraphicsPushContext(const ScopedUIGraphicsPushContext&) = delete;
  12. ScopedUIGraphicsPushContext& operator=(const ScopedUIGraphicsPushContext&) =
  13. delete;
  14. ~ScopedUIGraphicsPushContext();
  15. private:
  16. CGContextRef context_;
  17. };
  18. } // namespace gfx
  19. #endif // UI_GFX_SCOPED_UI_GRAPHICS_PUSH_CONTEXT_IOS_H_