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

Side by Side Diff: cc/output/output_surface.h

Issue 15647021: Factor out cc::OutputSurface::InitializeAndSetContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: refactor tests Created 7 years, 6 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
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | cc/output/output_surface.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_OUTPUT_OUTPUT_SURFACE_H_ 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/output/context_provider.h"
11 #include "cc/output/software_output_device.h" 13 #include "cc/output/software_output_device.h"
12 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 14 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
13 15
14 namespace ui { struct LatencyInfo; } 16 namespace ui { struct LatencyInfo; }
15 17
16 namespace gfx { 18 namespace gfx {
17 class Rect; 19 class Rect;
18 class Size; 20 class Size;
19 } 21 }
20 22
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Notifies frame-rate smoothness preference. If true, all non-critical 101 // Notifies frame-rate smoothness preference. If true, all non-critical
100 // processing should be stopped, or lowered in priority. 102 // processing should be stopped, or lowered in priority.
101 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} 103 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {}
102 104
103 // Requests a BeginFrame notification from the output surface. The 105 // Requests a BeginFrame notification from the output surface. The
104 // notification will be delivered by calling 106 // notification will be delivered by calling
105 // OutputSurfaceClient::BeginFrame until the callback is disabled. 107 // OutputSurfaceClient::BeginFrame until the callback is disabled.
106 virtual void SetNeedsBeginFrame(bool enable) {} 108 virtual void SetNeedsBeginFrame(bool enable) {}
107 109
108 protected: 110 protected:
111 bool InitializeAndSetContext3D(
joth 2013/06/07 01:02:14 document? esp. is context_provider for offscreen (
danakj 2013/06/07 14:26:09 Agree, offscreen_context_provider is the name used
boliu 2013/06/07 16:03:44 Done.
112 scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
113 scoped_refptr<ContextProvider> context_provider);
114
109 OutputSurfaceClient* client_; 115 OutputSurfaceClient* client_;
110 struct cc::OutputSurface::Capabilities capabilities_; 116 struct cc::OutputSurface::Capabilities capabilities_;
117 scoped_ptr<OutputSurfaceCallbacks> callbacks_;
111 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; 118 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
112 scoped_ptr<cc::SoftwareOutputDevice> software_device_; 119 scoped_ptr<cc::SoftwareOutputDevice> software_device_;
113 bool has_gl_discard_backbuffer_; 120 bool has_gl_discard_backbuffer_;
114 gfx::Size surface_size_; 121 gfx::Size surface_size_;
115 float device_scale_factor_; 122 float device_scale_factor_;
116 123
117 scoped_ptr<OutputSurfaceCallbacks> callbacks_;
118
119 private: 124 private:
125 void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
120 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 126 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
121 }; 127 };
122 128
123 } // namespace cc 129 } // namespace cc
124 130
125 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 131 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | cc/output/output_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698