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

Side by Side Diff: content/public/browser/android/synchronous_compositor.h

Issue 143023005: Support multiple service instances with GLInProcessContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "gpu/command_buffer/service/in_process_command_buffer.h"
10 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
11 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
12 13
13 class SkCanvas; 14 class SkCanvas;
14 15
15 namespace gfx { 16 namespace gfx {
16 class GLSurface; 17 class GLSurface;
17 class Transform; 18 class Transform;
18 }; 19 };
19 20
(...skipping 30 matching lines...) Expand all
50 // the client is being deleted prior to the DidDestroyCompositor() call 51 // the client is being deleted prior to the DidDestroyCompositor() call
51 // being received by the client). Ownership of |client| remains with 52 // being received by the client). Ownership of |client| remains with
52 // the caller. 53 // the caller.
53 virtual void SetClient(SynchronousCompositorClient* client) = 0; 54 virtual void SetClient(SynchronousCompositorClient* client) = 0;
54 55
55 // Synchronously initialize compositor for hardware draw. Can only be called 56 // Synchronously initialize compositor for hardware draw. Can only be called
56 // while compositor is in software only mode, either after compositor is 57 // while compositor is in software only mode, either after compositor is
57 // first created or after ReleaseHwDraw is called. It is invalid to 58 // first created or after ReleaseHwDraw is called. It is invalid to
58 // DemandDrawHw before this returns true. |surface| is the GLSurface that 59 // DemandDrawHw before this returns true. |surface| is the GLSurface that
59 // should be used to create the underlying hardware context. 60 // should be used to create the underlying hardware context.
60 virtual bool InitializeHwDraw(scoped_refptr<gfx::GLSurface> surface) = 0; 61 virtual bool InitializeHwDraw(
62 scoped_refptr<gfx::GLSurface> surface,
63 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) = 0;
61 64
62 // Reverse of InitializeHwDraw above. Can only be called while hardware draw 65 // Reverse of InitializeHwDraw above. Can only be called while hardware draw
63 // is already initialized. Brings compositor back to software only mode and 66 // is already initialized. Brings compositor back to software only mode and
64 // releases all hardware resources. 67 // releases all hardware resources.
65 virtual void ReleaseHwDraw() = 0; 68 virtual void ReleaseHwDraw() = 0;
66 69
67 // "On demand" hardware draw. The content is first clipped to |damage_area|, 70 // "On demand" hardware draw. The content is first clipped to |damage_area|,
68 // then transformed through |transform|, and finally clipped to |view_size| 71 // then transformed through |transform|, and finally clipped to |view_size|
69 // and by the existing stencil buffer if any. 72 // and by the existing stencil buffer if any.
70 virtual bool DemandDrawHw( 73 virtual bool DemandDrawHw(
(...skipping 16 matching lines...) Expand all
87 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). 90 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset).
88 virtual void DidChangeRootLayerScrollOffset() = 0; 91 virtual void DidChangeRootLayerScrollOffset() = 0;
89 92
90 protected: 93 protected:
91 virtual ~SynchronousCompositor() {} 94 virtual ~SynchronousCompositor() {}
92 }; 95 };
93 96
94 } // namespace content 97 } // namespace content
95 98
96 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 99 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698