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

Unified Diff: content/common/gpu/image_transport_surface_iosurface_mac.cc

Issue 1065123002: Mac: Partially enable partial swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/common/gpu/image_transport_surface_iosurface_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_iosurface_mac.cc
diff --git a/content/common/gpu/image_transport_surface_iosurface_mac.cc b/content/common/gpu/image_transport_surface_iosurface_mac.cc
index d2c6b57b945aaf4aa9ab9736e0b41ef2570e2b39..2b61810884f4a1eea7472a57f59504f7f5db41ce 100644
--- a/content/common/gpu/image_transport_surface_iosurface_mac.cc
+++ b/content/common/gpu/image_transport_surface_iosurface_mac.cc
@@ -42,7 +42,8 @@ void AddIntegerValue(CFMutableDictionaryRef dictionary,
IOSurfaceStorageProvider::IOSurfaceStorageProvider(
ImageTransportSurfaceFBO* transport_surface)
- : transport_surface_(transport_surface) {}
+ : transport_surface_(transport_surface),
+ frame_scale_factor_(1) {}
IOSurfaceStorageProvider::~IOSurfaceStorageProvider() {
DCHECK(!io_surface_);
@@ -105,8 +106,13 @@ void IOSurfaceStorageProvider::FreeColorBufferStorage() {
io_surface_id_ = 0;
}
-void IOSurfaceStorageProvider::SwapBuffers(
- const gfx::Size& size, float scale_factor) {
+void IOSurfaceStorageProvider::FrameSizeChanged(const gfx::Size& pixel_size,
+ float scale_factor) {
+ frame_pixel_size_ = pixel_size;
+ frame_scale_factor_ = scale_factor;
+}
+
+void IOSurfaceStorageProvider::SwapBuffers() {
// The browser compositor will throttle itself, so we are free to unblock the
// context immediately. Make sure that the browser is doing its throttling
// appropriately by ensuring that the previous swap was acknowledged before
@@ -115,7 +121,9 @@ void IOSurfaceStorageProvider::SwapBuffers(
pending_swapped_surfaces_.push_back(io_surface_);
transport_surface_->SendSwapBuffers(
- ui::SurfaceHandleFromIOSurfaceID(io_surface_id_), size, scale_factor);
+ ui::SurfaceHandleFromIOSurfaceID(io_surface_id_),
+ frame_pixel_size_,
+ frame_scale_factor_);
}
void IOSurfaceStorageProvider::WillWriteToBackbuffer() {
« no previous file with comments | « content/common/gpu/image_transport_surface_iosurface_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698