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

Unified Diff: content/renderer/pepper/ppb_graphics_3d_impl.h

Issue 2135063002: Revert of Simplify ppapi Graphics3D size propagation a bit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_attr_parse_to_pepper
Patch Set: 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 | « no previous file | content/renderer/pepper/ppb_graphics_3d_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_graphics_3d_impl.h
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.h b/content/renderer/pepper/ppb_graphics_3d_impl.h
index dca5aaa98e7cd820b39c671c7aba6d8064314621..9255e024cb5e864ba3b58bc663b3a92d2e516c6f 100644
--- a/content/renderer/pepper/ppb_graphics_3d_impl.h
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.h
@@ -75,7 +75,8 @@
gpu::CommandBuffer* GetCommandBuffer() override;
gpu::GpuControl* GetGpuControl() override;
int32_t DoSwapBuffers(const gpu::SyncToken& sync_token,
- const gfx::Size& size) override;
+ int32_t width,
+ int32_t height) override;
private:
explicit PPB_Graphics3D_Impl(PP_Instance instance);
@@ -115,6 +116,12 @@
bool lost_context_ = false;
#endif
+ // The width and height of the command buffer back buffer are first sized from
+ // this process, but then resized by the pepper process. Cache the original
+ // size.
+ int32_t original_width_ = 0;
+ int32_t original_height_ = 0;
+
bool has_alpha_;
bool use_image_chromium_;
std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
« no previous file with comments | « no previous file | content/renderer/pepper/ppb_graphics_3d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698