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

Side by Side Diff: content/browser/renderer_host/compositing_iosurface_mac.h

Issue 14846015: Update IOSurface scale factor before compare (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void ClearDrawable(); 107 void ClearDrawable();
108 108
109 bool HasIOSurface() { return !!io_surface_.get(); } 109 bool HasIOSurface() { return !!io_surface_.get(); }
110 110
111 const gfx::Size& pixel_io_surface_size() const { 111 const gfx::Size& pixel_io_surface_size() const {
112 return pixel_io_surface_size_; 112 return pixel_io_surface_size_;
113 } 113 }
114 // In cocoa view units / DIPs. 114 // In cocoa view units / DIPs.
115 const gfx::Size& io_surface_size() const { return io_surface_size_; } 115 const gfx::Size& io_surface_size() const { return io_surface_size_; }
116 116
117 void SetDeviceScaleFactor(float scale_factor);
118
117 bool is_vsync_disabled() const; 119 bool is_vsync_disabled() const;
118 120
119 // Get vsync scheduling parameters. 121 // Get vsync scheduling parameters.
120 // |interval_numerator/interval_denominator| equates to fractional number of 122 // |interval_numerator/interval_denominator| equates to fractional number of
121 // seconds between vsyncs. 123 // seconds between vsyncs.
122 void GetVSyncParameters(base::TimeTicks* timebase, 124 void GetVSyncParameters(base::TimeTicks* timebase,
123 uint32* interval_numerator, 125 uint32* interval_numerator,
124 uint32* interval_denominator); 126 uint32* interval_denominator);
125 127
126 // Returns true if asynchronous readback is supported on this system. 128 // Returns true if asynchronous readback is supported on this system.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // A pool of CopyContexts with OpenGL objects ready for re-use. Prefer to 328 // A pool of CopyContexts with OpenGL objects ready for re-use. Prefer to
327 // pull one from the pool before creating a new CopyContext. 329 // pull one from the pool before creating a new CopyContext.
328 std::vector<CopyContext*> copy_context_pool_; 330 std::vector<CopyContext*> copy_context_pool_;
329 331
330 // CopyContexts being used for in-flight copy operations. 332 // CopyContexts being used for in-flight copy operations.
331 std::deque<CopyContext*> copy_requests_; 333 std::deque<CopyContext*> copy_requests_;
332 334
333 // Timer for finishing a copy operation. 335 // Timer for finishing a copy operation.
334 base::Timer finish_copy_timer_; 336 base::Timer finish_copy_timer_;
335 337
336 SurfaceQuad quad_;
337
338 // CVDisplayLink for querying Vsync timing info and throttling swaps. 338 // CVDisplayLink for querying Vsync timing info and throttling swaps.
339 CVDisplayLinkRef display_link_; 339 CVDisplayLinkRef display_link_;
340 340
341 // Timer for stopping display link after a timeout with no swaps. 341 // Timer for stopping display link after a timeout with no swaps.
342 base::DelayTimer<CompositingIOSurfaceMac> display_link_stop_timer_; 342 base::DelayTimer<CompositingIOSurfaceMac> display_link_stop_timer_;
343 343
344 // Lock for sharing data between UI thread and display-link thread. 344 // Lock for sharing data between UI thread and display-link thread.
345 base::Lock lock_; 345 base::Lock lock_;
346 346
347 // Counts for throttling swaps. 347 // Counts for throttling swaps.
348 int64 vsync_count_; 348 int64 vsync_count_;
349 int64 swap_count_; 349 int64 swap_count_;
350 350
351 // Vsync timing data. 351 // Vsync timing data.
352 base::TimeTicks vsync_timebase_; 352 base::TimeTicks vsync_timebase_;
353 uint32 vsync_interval_numerator_; 353 uint32 vsync_interval_numerator_;
354 uint32 vsync_interval_denominator_; 354 uint32 vsync_interval_denominator_;
355 355
356 bool initialized_is_intel_; 356 bool initialized_is_intel_;
357 bool is_intel_; 357 bool is_intel_;
358 GLint screen_; 358 GLint screen_;
359 }; 359 };
360 360
361 } // namespace content 361 } // namespace content
362 362
363 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ 363 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698