Chromium Code Reviews| Index: webkit/gpu/grcontext_for_webgraphicscontext3d.h | 
| diff --git a/webkit/gpu/grcontext_for_webgraphicscontext3d.h b/webkit/gpu/grcontext_for_webgraphicscontext3d.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..889b3b04e77d8a18e05b24158b9135a572a3a74c | 
| --- /dev/null | 
| +++ b/webkit/gpu/grcontext_for_webgraphicscontext3d.h | 
| @@ -0,0 +1,35 @@ | 
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef WEBKIT_GPU_GRCONTEXT_FOR_WEBGRAPHICSCONTEXT3D_H_ | 
| +#define WEBKIT_GPU_GRCONTEXT_FOR_WEBGRAPHICSCONTEXT3D_H_ | 
| + | 
| +#include "skia/ext/refptr.h" | 
| +#include "webkit/gpu/webkit_gpu_export.h" | 
| + | 
| +class GrContext; | 
| +namespace WebKit { class WebGraphicsContext3D; } | 
| + | 
| +namespace webkit { | 
| +namespace gpu { | 
| + | 
| +// This class binds an offscreen GrContext to an offscreen context3d. | 
| 
 
piman
2013/02/13 19:13:31
nit: it'd be useful to remind the user that the co
 
danakj
2013/02/13 20:47:10
Done.
 
 | 
| +class WEBKIT_GPU_EXPORT GrContextForWebGraphicsContext3D { | 
| + public: | 
| + explicit GrContextForWebGraphicsContext3D( | 
| + WebKit::WebGraphicsContext3D* context3d); | 
| + virtual ~GrContextForWebGraphicsContext3D(); | 
| + | 
| + GrContext* gr_context() { return gr_context_.get(); } | 
| + | 
| + void SetMemoryLimit(bool nonzero_allocation); | 
| + | 
| + private: | 
| + skia::RefPtr<class GrContext> gr_context_; | 
| +}; | 
| + | 
| +} // namespace gpu | 
| +} // namespace webkit | 
| + | 
| +#endif // WEBKIT_GPU_GRCONTEXT_FOR_WEBGRAPHICSCONTEXT3D_H_ |