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

Side by Side Diff: content/browser/compositor/offscreen_browser_compositor_output_surface.h

Issue 2631263003: [headless] Fix screenshots with gpu enabled. (Closed)
Patch Set: add skia dep to build file. Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _
6 #define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _ 6 #define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/cancelable_callback.h" 12 #include "base/cancelable_callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/browser/compositor/browser_compositor_output_surface.h" 16 #include "content/browser/compositor/browser_compositor_output_surface.h"
17 #include "ui/events/latency_info.h"
17 18
18 namespace ui { 19 namespace ui {
19 class ContextProviderCommandBuffer; 20 class ContextProviderCommandBuffer;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 class ReflectorTexture; 24 class ReflectorTexture;
24 25
25 class OffscreenBrowserCompositorOutputSurface 26 class OffscreenBrowserCompositorOutputSurface
26 : public BrowserCompositorOutputSurface { 27 : public BrowserCompositorOutputSurface {
(...skipping 21 matching lines...) Expand all
48 unsigned GetOverlayTextureId() const override; 49 unsigned GetOverlayTextureId() const override;
49 bool SurfaceIsSuspendForRecycle() const override; 50 bool SurfaceIsSuspendForRecycle() const override;
50 uint32_t GetFramebufferCopyTextureFormat() override; 51 uint32_t GetFramebufferCopyTextureFormat() override;
51 52
52 // BrowserCompositorOutputSurface implementation. 53 // BrowserCompositorOutputSurface implementation.
53 void OnReflectorChanged() override; 54 void OnReflectorChanged() override;
54 #if defined(OS_MACOSX) 55 #if defined(OS_MACOSX)
55 void SetSurfaceSuspendedForRecycle(bool suspended) override {}; 56 void SetSurfaceSuspendedForRecycle(bool suspended) override {};
56 #endif 57 #endif
57 58
58 void OnSwapBuffersComplete(); 59 void OnSwapBuffersComplete(const std::vector<ui::LatencyInfo>& latency_info);
59 60
60 cc::OutputSurfaceClient* client_ = nullptr; 61 cc::OutputSurfaceClient* client_ = nullptr;
61 gfx::Size reshape_size_; 62 gfx::Size reshape_size_;
62 uint32_t fbo_ = 0; 63 uint32_t fbo_ = 0;
63 bool reflector_changed_ = false; 64 bool reflector_changed_ = false;
64 std::unique_ptr<ReflectorTexture> reflector_texture_; 65 std::unique_ptr<ReflectorTexture> reflector_texture_;
65 base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface> 66 base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface>
66 weak_ptr_factory_; 67 weak_ptr_factory_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(OffscreenBrowserCompositorOutputSurface); 69 DISALLOW_COPY_AND_ASSIGN(OffscreenBrowserCompositorOutputSurface);
69 }; 70 };
70 71
71 } // namespace content 72 } // namespace content
72 73
73 #endif // CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFAC E_H_ 74 #endif // CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFAC E_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698