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

Unified Diff: ppapi/shared_impl/ppb_graphics_3d_shared.h

Issue 2136743002: Simplify ppapi Graphics3D size propagation a bit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_attr_parse_to_pepper
Patch Set: fix win64+gyp build 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/DEPS ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_graphics_3d_shared.h
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.h b/ppapi/shared_impl/ppb_graphics_3d_shared.h
index 4c8a1ab6c7443c3c7aaeb0dccd41346a570e0abe..84bad21d19e049f1c556174f727ff3f21b932585 100644
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.h
+++ b/ppapi/shared_impl/ppb_graphics_3d_shared.h
@@ -15,6 +15,7 @@
#include "ppapi/shared_impl/resource.h"
#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/ppb_graphics_3d_api.h"
+#include "ui/gfx/geometry/size.h"
namespace gpu {
class CommandBuffer;
@@ -44,8 +45,7 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
int32_t SwapBuffers(scoped_refptr<TrackedCallback> callback) override;
int32_t SwapBuffersWithSyncToken(scoped_refptr<TrackedCallback> callback,
const gpu::SyncToken& sync_token,
- int32_t width,
- int32_t height) override;
+ const gfx::Size& size) override;
int32_t GetAttribMaxValue(int32_t attribute, int32_t* value) override;
void* MapTexSubImage2DCHROMIUM(GLenum target,
@@ -67,14 +67,14 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
protected:
PPB_Graphics3D_Shared(PP_Instance instance);
- PPB_Graphics3D_Shared(const HostResource& host_resource);
+ PPB_Graphics3D_Shared(const HostResource& host_resource,
+ const gfx::Size& size);
~PPB_Graphics3D_Shared() override;
virtual gpu::CommandBuffer* GetCommandBuffer() = 0;
virtual gpu::GpuControl* GetGpuControl() = 0;
virtual int32_t DoSwapBuffers(const gpu::SyncToken& sync_token,
- int32_t width,
- int32_t height) = 0;
+ const gfx::Size& size) = 0;
bool HasPendingSwap() const;
bool CreateGLES2Impl(int32_t command_buffer_size,
@@ -87,9 +87,9 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_;
- // A local cache of the size of the viewport.
- int32_t width_ = -1;
- int32_t height_ = -1;
+ // A local cache of the size of the viewport. This is only valid in plugin
+ // resources.
+ gfx::Size size_;
// Callback that needs to be executed when swap-buffers is completed.
scoped_refptr<TrackedCallback> swap_callback_;
« no previous file with comments | « ppapi/shared_impl/DEPS ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698