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

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

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 | « content/renderer/pepper/ppb_graphics_3d_impl.h ('k') | ppapi/ppapi_internal.gyp » ('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.cc
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc
index 816c3a3ffb63f5277f03065a410a1bfc68253357..8545095efc5a7003c311e8aff5c03bffb002bd06 100644
--- a/content/renderer/pepper/ppb_graphics_3d_impl.cc
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
@@ -168,8 +168,7 @@ gpu::GpuControl* PPB_Graphics3D_Impl::GetGpuControl() {
}
int32_t PPB_Graphics3D_Impl::DoSwapBuffers(const gpu::SyncToken& sync_token,
- int32_t width,
- int32_t height) {
+ const gfx::Size& size) {
DCHECK(command_buffer_);
if (taken_front_buffer_.IsZero()) {
DLOG(ERROR) << "TakeFrontBuffer should be called before DoSwapBuffers";
@@ -184,16 +183,11 @@ int32_t PPB_Graphics3D_Impl::DoSwapBuffers(const gpu::SyncToken& sync_token,
//
// Don't need to check for NULL from GetPluginInstance since when we're
// bound, we know our instance is valid.
- if (width < 0 || height < 0) {
- width = original_width_;
- height = original_height_;
- }
bool is_overlay_candidate = use_image_chromium_;
GLenum target =
is_overlay_candidate ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D;
cc::TextureMailbox texture_mailbox(taken_front_buffer_, sync_token, target,
- gfx::Size(width, height),
- is_overlay_candidate, false);
+ size, is_overlay_candidate, false);
taken_front_buffer_.SetZero();
HostGlobals::Get()
->GetInstance(pp_instance())
@@ -261,8 +255,6 @@ bool PPB_Graphics3D_Impl::InitRaw(
std::move(channel), gpu::kNullSurfaceHandle, share_buffer,
gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, attrib_helper,
GURL::EmptyGURL(), base::ThreadTaskRunnerHandle::Get());
- original_width_ = attrib_helper.offscreen_framebuffer_size.width();
- original_height_ = attrib_helper.offscreen_framebuffer_size.height();
if (!command_buffer_)
return false;
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.h ('k') | ppapi/ppapi_internal.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698