Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: ppapi/shared_impl/ppb_graphics_3d_shared.h

Issue 2086363004: mac: Finish plumbing for Pepper3D Image Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp98_native_gmb
Patch Set: nits. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ 5 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_
6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ 6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 virtual gpu::CommandBuffer* GetCommandBuffer() = 0; 71 virtual gpu::CommandBuffer* GetCommandBuffer() = 0;
72 virtual gpu::GpuControl* GetGpuControl() = 0; 72 virtual gpu::GpuControl* GetGpuControl() = 0;
73 virtual int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) = 0; 73 virtual int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) = 0;
74 74
75 bool HasPendingSwap() const; 75 bool HasPendingSwap() const;
76 bool CreateGLES2Impl(int32_t command_buffer_size, 76 bool CreateGLES2Impl(int32_t command_buffer_size,
77 int32_t transfer_buffer_size, 77 int32_t transfer_buffer_size,
78 gpu::gles2::GLES2Implementation* share_gles2); 78 gpu::gles2::GLES2Implementation* share_gles2);
79 void DestroyGLES2Impl(); 79 void DestroyGLES2Impl();
80 80
81 // Must be called by this class or subclasses any time the viewport size
82 // changes.
83 void SetSize(int32_t width, int32_t height);
84 int32_t width() { return width_; }
85 int32_t height() { return height_; }
86
81 private: 87 private:
82 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 88 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
83 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; 89 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
84 std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; 90 std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_;
85 91
92 // A local cache of the size of the viewport.
93 int32_t width_ = 0;
94 int32_t height_ = 0;
95
86 // Callback that needs to be executed when swap-buffers is completed. 96 // Callback that needs to be executed when swap-buffers is completed.
87 scoped_refptr<TrackedCallback> swap_callback_; 97 scoped_refptr<TrackedCallback> swap_callback_;
88 98
89 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); 99 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared);
90 }; 100 };
91 101
92 } // namespace ppapi 102 } // namespace ppapi
93 103
94 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ 104 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698