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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTestHelpers.h

Issue 2905633002: Bind framebuffer to fbo_ object before readPixels, rather than multisample_fbo_ (Closed)
Patch Set: Resolve crash issue, need run releaseCallback once in case Created 3 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "gpu/command_buffer/common/capabilities.h" 5 #include "gpu/command_buffer/common/capabilities.h"
6 #include "platform/RuntimeEnabledFeatures.h" 6 #include "platform/RuntimeEnabledFeatures.h"
7 #include "platform/graphics/CanvasColorParams.h" 7 #include "platform/graphics/CanvasColorParams.h"
8 #include "platform/graphics/gpu/DrawingBuffer.h" 8 #include "platform/graphics/gpu/DrawingBuffer.h"
9 #include "platform/graphics/gpu/Extensions3DUtil.h" 9 #include "platform/graphics/gpu/Extensions3DUtil.h"
10 #include "public/platform/WebGraphicsContext3DProvider.h" 10 #include "public/platform/WebGraphicsContext3DProvider.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void WaitSyncTokenCHROMIUM(const GLbyte* sync_token) override { 207 void WaitSyncTokenCHROMIUM(const GLbyte* sync_token) override {
208 memcpy(&most_recently_waited_sync_token_, sync_token, 208 memcpy(&most_recently_waited_sync_token_, sync_token,
209 sizeof(most_recently_waited_sync_token_)); 209 sizeof(most_recently_waited_sync_token_));
210 } 210 }
211 211
212 GLenum CheckFramebufferStatus(GLenum target) override { 212 GLenum CheckFramebufferStatus(GLenum target) override {
213 return GL_FRAMEBUFFER_COMPLETE; 213 return GL_FRAMEBUFFER_COMPLETE;
214 } 214 }
215 215
216 void GetIntegerv(GLenum pname, GLint* value) override { 216 void GetIntegerv(GLenum pname, GLint* value) override {
217 if (pname == GL_MAX_TEXTURE_SIZE) 217 switch (pname) {
218 *value = 1024; 218 case GL_DRAW_FRAMEBUFFER_BINDING:
219 *value = state_.draw_framebuffer_binding;
220 break;
221 case GL_READ_FRAMEBUFFER_BINDING:
222 *value = state_.read_framebuffer_binding;
223 break;
224 case GL_MAX_TEXTURE_SIZE:
225 *value = 1024;
226 default:
227 break;
228 }
219 } 229 }
220 230
221 void GenMailboxCHROMIUM(GLbyte* mailbox) override { 231 void GenMailboxCHROMIUM(GLbyte* mailbox) override {
222 ++current_mailbox_byte_; 232 ++current_mailbox_byte_;
223 memset(mailbox, current_mailbox_byte_, GL_MAILBOX_SIZE_CHROMIUM); 233 memset(mailbox, current_mailbox_byte_, GL_MAILBOX_SIZE_CHROMIUM);
224 } 234 }
225 235
226 void ProduceTextureDirectCHROMIUM(GLuint texture, 236 void ProduceTextureDirectCHROMIUM(GLuint texture,
227 GLenum target, 237 GLenum target,
228 const GLbyte* mailbox) override { 238 const GLbyte* mailbox) override {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 GLbyte current_mailbox_byte_ = 0; 412 GLbyte current_mailbox_byte_ = 0;
403 IntSize most_recently_produced_size_; 413 IntSize most_recently_produced_size_;
404 bool create_image_chromium_fail_ = false; 414 bool create_image_chromium_fail_ = false;
405 GLuint current_image_id_ = 1; 415 GLuint current_image_id_ = 1;
406 HashMap<GLuint, IntSize> texture_sizes_; 416 HashMap<GLuint, IntSize> texture_sizes_;
407 HashMap<GLuint, IntSize> image_sizes_; 417 HashMap<GLuint, IntSize> image_sizes_;
408 HashMap<GLuint, GLuint> image_to_texture_map_; 418 HashMap<GLuint, GLuint> image_to_texture_map_;
409 }; 419 };
410 420
411 } // blink 421 } // blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698