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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged with Tip-of-Tree Created 8 years, 9 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_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // WebGraphicsContext3D methods 70 // WebGraphicsContext3D methods
71 71
72 // Must be called after initialize() and before any of the following methods. 72 // Must be called after initialize() and before any of the following methods.
73 // Permanently binds to the first calling thread. Returns false if the 73 // Permanently binds to the first calling thread. Returns false if the
74 // graphics context fails to create. Do not call from more than one thread. 74 // graphics context fails to create. Do not call from more than one thread.
75 virtual bool makeContextCurrent(); 75 virtual bool makeContextCurrent();
76 76
77 virtual int width(); 77 virtual int width();
78 virtual int height(); 78 virtual int height();
79 79
80 virtual void playDead();
81
80 virtual bool isGLES2Compliant(); 82 virtual bool isGLES2Compliant();
81 83
82 virtual bool setParentContext(WebGraphicsContext3D* parent_context); 84 virtual bool setParentContext(WebGraphicsContext3D* parent_context);
83 85
84 virtual void reshape(int width, int height); 86 virtual void reshape(int width, int height);
85 87
86 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size); 88 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size);
87 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size, 89 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size,
88 WebGLId framebuffer, int width, int height); 90 WebGLId framebuffer, int width, int height);
89 91
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 530
529 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* 531 WebGraphicsContext3D::WebGraphicsErrorMessageCallback*
530 error_message_callback_; 532 error_message_callback_;
531 533
532 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* 534 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM*
533 swapbuffers_complete_callback_; 535 swapbuffers_complete_callback_;
534 536
535 WebKit::WebGraphicsContext3D::Attributes attributes_; 537 WebKit::WebGraphicsContext3D::Attributes attributes_;
536 gfx::GpuPreference gpu_preference_; 538 gfx::GpuPreference gpu_preference_;
537 int cached_width_, cached_height_; 539 int cached_width_, cached_height_;
540 bool dead_;
538 541
539 // For tracking which FBO is bound. 542 // For tracking which FBO is bound.
540 WebGLId bound_fbo_; 543 WebGLId bound_fbo_;
541 544
542 // Errors raised by synthesizeGLError(). 545 // Errors raised by synthesizeGLError().
543 std::vector<WGC3Denum> synthetic_errors_; 546 std::vector<WGC3Denum> synthetic_errors_;
544 547
545 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; 548 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
546 549
547 #ifdef FLIP_FRAMEBUFFER_VERTICALLY 550 #ifdef FLIP_FRAMEBUFFER_VERTICALLY
548 std::vector<uint8> scanline_; 551 std::vector<uint8> scanline_;
549 void FlipVertically(uint8* framebuffer, 552 void FlipVertically(uint8* framebuffer,
550 unsigned int width, 553 unsigned int width,
551 unsigned int height); 554 unsigned int height);
552 #endif 555 #endif
553 }; 556 };
554 557
555 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 558 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698