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

Side by Side Diff: Source/platform/graphics/gpu/DrawingBuffer.h

Issue 981913002: update getFramebufferAttachmentParameter for WebGL 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback + rebased code Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Destruction will be completed after all mailboxes are released. 99 // Destruction will be completed after all mailboxes are released.
100 void beginDestruction(); 100 void beginDestruction();
101 101
102 // Issues a glClear() on all framebuffers associated with this DrawingBuffer . The caller is responsible for 102 // Issues a glClear() on all framebuffers associated with this DrawingBuffer . The caller is responsible for
103 // making the context current and setting the clear values and masks. Modifi es the framebuffer binding. 103 // making the context current and setting the clear values and masks. Modifi es the framebuffer binding.
104 void clearFramebuffers(GLbitfield clearMask); 104 void clearFramebuffers(GLbitfield clearMask);
105 105
106 // Given the desired buffer size, provides the largest dimensions that will fit in the pixel budget. 106 // Given the desired buffer size, provides the largest dimensions that will fit in the pixel budget.
107 static IntSize adjustSize(const IntSize& desiredSize, const IntSize& curSize , int maxTextureSize); 107 static IntSize adjustSize(const IntSize& desiredSize, const IntSize& curSize , int maxTextureSize);
108 bool reset(const IntSize&); 108 bool reset(const IntSize&);
109 void bind(); 109 void bind(GLenum target = GL_FRAMEBUFFER);
110 IntSize size() const { return m_size; } 110 IntSize size() const { return m_size; }
111 111
112 // Copies the multisample color buffer to the normal color buffer and leaves m_fbo bound. 112 // Copies the multisample color buffer to the normal color buffer and leaves m_fbo bound.
113 void commit(); 113 void commit();
114 114
115 // commit should copy the full multisample buffer, and not respect the 115 // commit should copy the full multisample buffer, and not respect the
116 // current scissor bounds. Track the state of the scissor test so that it 116 // current scissor bounds. Track the state of the scissor test so that it
117 // can be disabled during calls to commit. 117 // can be disabled during calls to commit.
118 void setScissorEnabled(bool scissorEnabled) { m_scissorEnabled = scissorEnab led; } 118 void setScissorEnabled(bool scissorEnabled) { m_scissorEnabled = scissorEnab led; }
119 119
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // used to resize the Canvas. 295 // used to resize the Canvas.
296 SkBitmap m_resizingBitmap; 296 SkBitmap m_resizingBitmap;
297 297
298 // Used to flip a bitmap vertically. 298 // Used to flip a bitmap vertically.
299 Vector<uint8_t> m_scanline; 299 Vector<uint8_t> m_scanline;
300 }; 300 };
301 301
302 } // namespace blink 302 } // namespace blink
303 303
304 #endif // DrawingBuffer_h 304 #endif // DrawingBuffer_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.cpp ('k') | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698