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

Side by Side Diff: webkit/common/gpu/webgraphicscontext3d_impl.h

Issue 455783002: GPU context creation code duplication cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fix even more build dependencies Created 6 years, 4 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
« no previous file with comments | « gpu/gpu.gyp ('k') | webkit/common/gpu/webgraphicscontext3d_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ 5 #ifndef WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_
6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ 6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 13 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
14 #include "third_party/WebKit/public/platform/WebString.h" 14 #include "third_party/WebKit/public/platform/WebString.h"
15 #include "webkit/common/gpu/webkit_gpu_export.h" 15 #include "webkit/common/gpu/webkit_gpu_export.h"
16 16
17 namespace gpu { 17 namespace gpu {
18 18
19 namespace gles2 { 19 namespace gles2 {
20 class GLES2Interface; 20 class GLES2Interface;
21 class GLES2ImplementationErrorMessageCallback; 21 class GLES2ImplementationErrorMessageCallback;
22 struct ContextCreationAttribHelper;
22 } 23 }
23 } 24 }
24 25
25 using blink::WebGLId; 26 using blink::WebGLId;
26 27
27 using blink::WGC3Dbyte; 28 using blink::WGC3Dbyte;
28 using blink::WGC3Dchar; 29 using blink::WGC3Dchar;
29 using blink::WGC3Denum; 30 using blink::WGC3Denum;
30 using blink::WGC3Dboolean; 31 using blink::WGC3Dboolean;
31 using blink::WGC3Dbitfield; 32 using blink::WGC3Dbitfield;
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 virtual void renderbufferStorageMultisampleEXT( 553 virtual void renderbufferStorageMultisampleEXT(
553 WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat, 554 WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat,
554 WGC3Dsizei width, WGC3Dsizei height); 555 WGC3Dsizei width, WGC3Dsizei height);
555 556
556 virtual GrGLInterface* createGrGLInterface(); 557 virtual GrGLInterface* createGrGLInterface();
557 558
558 ::gpu::gles2::GLES2Interface* GetGLInterface() { 559 ::gpu::gles2::GLES2Interface* GetGLInterface() {
559 return gl_; 560 return gl_;
560 } 561 }
561 562
563 // Convert WebGL context creation attributes into command buffer / EGL size
564 // requests.
565 static void ConvertAttributes(
566 const blink::WebGraphicsContext3D::Attributes& attributes,
567 ::gpu::gles2::ContextCreationAttribHelper* output_attribs);
568
562 protected: 569 protected:
563 friend class WebGraphicsContext3DErrorMessageCallback; 570 friend class WebGraphicsContext3DErrorMessageCallback;
564 571
565 WebGraphicsContext3DImpl(); 572 WebGraphicsContext3DImpl();
566 virtual ~WebGraphicsContext3DImpl(); 573 virtual ~WebGraphicsContext3DImpl();
567 574
568 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* 575 ::gpu::gles2::GLES2ImplementationErrorMessageCallback*
569 getErrorMessageCallback(); 576 getErrorMessageCallback();
570 virtual void OnErrorMessage(const std::string& message, int id); 577 virtual void OnErrorMessage(const std::string& message, int id);
571 578
(...skipping 17 matching lines...) Expand all
589 596
590 ::gpu::gles2::GLES2Interface* gl_; 597 ::gpu::gles2::GLES2Interface* gl_;
591 bool lose_context_when_out_of_memory_; 598 bool lose_context_when_out_of_memory_;
592 uint32_t flush_id_; 599 uint32_t flush_id_;
593 }; 600 };
594 601
595 } // namespace gpu 602 } // namespace gpu
596 } // namespace webkit 603 } // namespace webkit
597 604
598 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ 605 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_
OLDNEW
« no previous file with comments | « gpu/gpu.gyp ('k') | webkit/common/gpu/webgraphicscontext3d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698