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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Created 7 years, 8 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 (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 WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ 5 #ifndef WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_
6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ 6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include <vector> 10 #include <vector>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 virtual void blendEquationSeparate(WGC3Denum modeRGB, 95 virtual void blendEquationSeparate(WGC3Denum modeRGB,
96 WGC3Denum modeAlpha); 96 WGC3Denum modeAlpha);
97 virtual void blendFunc(WGC3Denum sfactor, WGC3Denum dfactor); 97 virtual void blendFunc(WGC3Denum sfactor, WGC3Denum dfactor);
98 virtual void blendFuncSeparate(WGC3Denum srcRGB, 98 virtual void blendFuncSeparate(WGC3Denum srcRGB,
99 WGC3Denum dstRGB, 99 WGC3Denum dstRGB,
100 WGC3Denum srcAlpha, 100 WGC3Denum srcAlpha,
101 WGC3Denum dstAlpha); 101 WGC3Denum dstAlpha);
102 102
103 virtual void bufferData(WGC3Denum target, WGC3Dsizeiptr size, 103 virtual void bufferData(WGC3Denum target, WGC3Dsizeiptr size,
104 const void* data, WGC3Denum usage); 104 const void* data, WGC3Denum usage);
105 virtual void imageBufferDataCHROMIUM(WGC3Denum target,
106 WGC3Dsizei width,
107 WGC3Dsizei height);
105 virtual void bufferSubData(WGC3Denum target, WGC3Dintptr offset, 108 virtual void bufferSubData(WGC3Denum target, WGC3Dintptr offset,
106 WGC3Dsizeiptr size, const void* data); 109 WGC3Dsizeiptr size, const void* data);
107 110
108 virtual WGC3Denum checkFramebufferStatus(WGC3Denum target); 111 virtual WGC3Denum checkFramebufferStatus(WGC3Denum target);
109 virtual void clear(WGC3Dbitfield mask); 112 virtual void clear(WGC3Dbitfield mask);
110 virtual void clearColor(WGC3Dclampf red, WGC3Dclampf green, 113 virtual void clearColor(WGC3Dclampf red, WGC3Dclampf green,
111 WGC3Dclampf blue, WGC3Dclampf alpha); 114 WGC3Dclampf blue, WGC3Dclampf alpha);
112 virtual void clearDepth(WGC3Dclampf depth); 115 virtual void clearDepth(WGC3Dclampf depth);
113 virtual void clearStencil(WGC3Dint s); 116 virtual void clearStencil(WGC3Dint s);
114 virtual void colorMask(WGC3Dboolean red, WGC3Dboolean green, 117 virtual void colorMask(WGC3Dboolean red, WGC3Dboolean green,
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // SwapBuffers callback. 552 // SwapBuffers callback.
550 void OnSwapBuffersComplete(); 553 void OnSwapBuffersComplete();
551 virtual void OnContextLost(); 554 virtual void OnContextLost();
552 555
553 bool MaybeInitializeGL(); 556 bool MaybeInitializeGL();
554 557
555 // Used to try to find bugs in code that calls gl directly through the gl api 558 // Used to try to find bugs in code that calls gl directly through the gl api
556 // instead of going through WebGraphicsContext3D. 559 // instead of going through WebGraphicsContext3D.
557 void ClearContext(); 560 void ClearContext();
558 561
562 void CreateImageForGpuMemoryBuffer(WGC3Dsizei width, WGC3Dsizei height);
563 void DeleteImageForGpuMemoryBuffer();
564 void DeleteImageForGpuMemoryBuffer(WebGLId id);
559 565
560 bool is_offscreen_; 566 bool is_offscreen_;
561 // Only used when not offscreen. 567 // Only used when not offscreen.
562 gfx::AcceleratedWidget window_; 568 gfx::AcceleratedWidget window_;
563 569
564 bool initialized_; 570 bool initialized_;
565 bool initialize_failed_; 571 bool initialize_failed_;
566 572
567 // The context we use for OpenGL rendering. 573 // The context we use for OpenGL rendering.
568 GLInProcessContext* context_; 574 GLInProcessContext* context_;
(...skipping 16 matching lines...) Expand all
585 void FlipVertically(uint8* framebuffer, 591 void FlipVertically(uint8* framebuffer,
586 unsigned int width, 592 unsigned int width,
587 unsigned int height); 593 unsigned int height);
588 }; 594 };
589 595
590 } // namespace gpu 596 } // namespace gpu
591 } // namespace webkit 597 } // namespace webkit
592 598
593 #endif // defined(ENABLE_GPU) 599 #endif // defined(ENABLE_GPU)
594 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ 600 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698