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

Unified Diff: content/common/gpu/image_transport_surface_fbo_mac.h

Issue 696823002: Fix content scaling bug on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: content/common/gpu/image_transport_surface_fbo_mac.h
diff --git a/content/common/gpu/image_transport_surface_fbo_mac.h b/content/common/gpu/image_transport_surface_fbo_mac.h
index c8002753d948cc91e8c5337e4d9ef3453244921c..dbcdc83f7a39f4c9666de0d038ed270798468dee 100644
--- a/content/common/gpu/image_transport_surface_fbo_mac.h
+++ b/content/common/gpu/image_transport_surface_fbo_mac.h
@@ -88,7 +88,7 @@ class ImageTransportSurfaceFBO
// ImageTransportSurface implementation
void OnBufferPresented(
const AcceleratedSurfaceMsg_BufferPresented_Params& params) override;
- void OnResize(gfx::Size size, float scale_factor) override;
+ void OnResize(gfx::Size pixel_size, float scale_factor) override;
void SetLatencyInfo(const std::vector<ui::LatencyInfo>&) override;
void WakeUpGpu() override;
@@ -100,7 +100,8 @@ class ImageTransportSurfaceFBO
void AdjustBufferAllocation();
void DestroyFramebuffer();
- void CreateFramebuffer();
+ void AllocateOrResizeFramebuffer(
+ const gfx::Size& pixel_size, float scale_factor);
scoped_ptr<StorageProvider> storage_provider_;
@@ -116,8 +117,8 @@ class ImageTransportSurfaceFBO
// Weak pointer to the context that this was last made current to.
gfx::GLContext* context_;
- gfx::Size size_;
- gfx::Size rounded_size_;
+ gfx::Size pixel_size_;
+ gfx::Size rounded_pixel_size_;
float scale_factor_;
// Whether or not we've successfully made the surface current once.
« no previous file with comments | « content/common/gpu/image_transport_surface_calayer_mac.mm ('k') | content/common/gpu/image_transport_surface_fbo_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698