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

Unified Diff: ui/gfx/surface/accelerated_surface_mac.h

Issue 7191025: Fixed warning from Core Graphics related to zero-width or zero-height (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | ui/gfx/surface/accelerated_surface_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/surface/accelerated_surface_mac.h
===================================================================
--- ui/gfx/surface/accelerated_surface_mac.h (revision 89274)
+++ ui/gfx/surface/accelerated_surface_mac.h (working copy)
@@ -124,6 +124,8 @@
// object is valid.
bool SetupFrameBufferObject(GLenum target);
+ gfx::Size ClampToValidDimensions(const gfx::Size& size);
+
// The OpenGL context, and pbuffer drawable, used to transfer data
// to the shared region (IOSurface or TransportDIB). Strictly
// speaking, we do not need to allocate a GL context all of the
@@ -147,6 +149,11 @@
// make this work (or even compile).
scoped_ptr<TransportDIB> transport_dib_;
gfx::Size surface_size_;
+ // It's important to avoid allocating zero-width or zero-height
+ // IOSurfaces and textures on the Mac, so we clamp each to a minimum
+ // of 1. This is the real size of the surface; surface_size_ is what
+ // the user requested.
+ gfx::Size real_surface_size_;
// TODO(kbr): the FBO management should not be in this class at all.
// However, if it is factored out, care needs to be taken to not
// introduce another copy of the color data on the GPU; the direct
« no previous file with comments | « no previous file | ui/gfx/surface/accelerated_surface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698