| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2013 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 | |
| 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GRCONTEXT_FOR_GLES2_INTERFACE_H_ | |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GRCONTEXT_FOR_GLES2_INTERFACE_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "third_party/skia/include/core/SkRefCnt.h" | |
| 10 | |
| 11 class GrContext; | |
| 12 | |
| 13 namespace gpu { | |
| 14 namespace gles2 { | |
| 15 class GLES2Interface; | |
| 16 } | |
| 17 } | |
| 18 | |
| 19 namespace content { | |
| 20 | |
| 21 // This class binds an offscreen GrContext to an offscreen context3d. The | |
| 22 // context3d is used by the GrContext so must be valid as long as this class | |
| 23 // is alive. | |
| 24 class GrContextForGLES2Interface { | |
| 25 public: | |
| 26 explicit GrContextForGLES2Interface(gpu::gles2::GLES2Interface* gl); | |
| 27 virtual ~GrContextForGLES2Interface(); | |
| 28 | |
| 29 GrContext* get() { return gr_context_.get(); } | |
| 30 | |
| 31 void OnLostContext(); | |
| 32 void FreeGpuResources(); | |
| 33 | |
| 34 private: | |
| 35 sk_sp<class GrContext> gr_context_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(GrContextForGLES2Interface); | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_COMMON_GPU_CLIENT_GRCONTEXT_FOR_GLES2_INTERFACE_H_ | |
| OLD | NEW |