| OLD | NEW |
| (Empty) |
| 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 | |
| 5 #ifndef PPAPI_MAIN_PPAPI_INSTANCE3D_H_ | |
| 6 #define PPAPI_MAIN_PPAPI_INSTANCE3D_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 #include "ppapi/c/pp_instance.h" | |
| 11 #include "ppapi/c/pp_resource.h" | |
| 12 | |
| 13 #include "ppapi/cpp/graphics_3d.h" | |
| 14 #include "ppapi/cpp/instance.h" | |
| 15 #include "ppapi/cpp/size.h" | |
| 16 | |
| 17 #include "ppapi_main/ppapi_instance.h" | |
| 18 | |
| 19 | |
| 20 class PPAPIInstance3D : public PPAPIInstance { | |
| 21 public: | |
| 22 PPAPIInstance3D(PP_Instance instance, const char *args[]); | |
| 23 virtual ~PPAPIInstance3D(); | |
| 24 | |
| 25 // Called when we need to rebuild the context | |
| 26 virtual void BuildContext(int32_t result, const pp::Size& new_size); | |
| 27 | |
| 28 // Called whenever a swap takes place | |
| 29 virtual void Flushed(int result); | |
| 30 | |
| 31 virtual void Render(PP_Resource ctx, uint32_t width, uint32_t height); | |
| 32 static PPAPIInstance3D* GetInstance3D(); | |
| 33 | |
| 34 protected: | |
| 35 pp::Graphics3D device_context_; | |
| 36 | |
| 37 }; | |
| 38 | |
| 39 | |
| 40 #endif // PPAPI_MAIN_PPAPI_INSTANCE3D_H_ | |
| OLD | NEW |