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

Unified Diff: content/common/gpu/null_transport_surface.cc

Issue 1366473002: Move WakeUpGpu logic to GpuChannelManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/null_transport_surface.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/null_transport_surface.cc
diff --git a/content/common/gpu/null_transport_surface.cc b/content/common/gpu/null_transport_surface.cc
deleted file mode 100644
index 33521a06d4c4965468afd69bce6aace448e28606..0000000000000000000000000000000000000000
--- a/content/common/gpu/null_transport_surface.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/common/gpu/null_transport_surface.h"
-
-#include "base/command_line.h"
-#include "content/common/gpu/gpu_channel.h"
-#include "content/common/gpu/gpu_channel_manager.h"
-#include "content/common/gpu/gpu_command_buffer_stub.h"
-#include "content/public/common/content_switches.h"
-#include "gpu/command_buffer/service/context_group.h"
-
-namespace content {
-
-NullTransportSurface::NullTransportSurface(
- GpuChannelManager* manager,
- GpuCommandBufferStub* stub,
- const gfx::GLSurfaceHandle& handle)
- : PassThroughImageTransportSurface(manager,
- stub,
- manager->GetDefaultOffscreenSurface()),
- parent_client_id_(handle.parent_client_id) {
-}
-
-NullTransportSurface::~NullTransportSurface() {
-}
-
-bool NullTransportSurface::Initialize() {
- if (!surface())
- return false;
-
- if (!PassThroughImageTransportSurface::Initialize())
- return false;
-
- GpuChannel* parent_channel =
- GetHelper()->manager()->LookupChannel(parent_client_id_);
- if (parent_channel) {
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess))
- GetHelper()->SetPreemptByFlag(parent_channel->GetPreemptionFlag());
- }
-
- return true;
-}
-
-void NullTransportSurface::Destroy() {
- // Do not destroy |surface_| since we use the shared offscreen surface.
-}
-
-gfx::SwapResult NullTransportSurface::SwapBuffers() {
- NOTIMPLEMENTED();
- return gfx::SwapResult::SWAP_FAILED;
-}
-
-gfx::SwapResult NullTransportSurface::PostSubBuffer(int x,
- int y,
- int width,
- int height) {
- NOTIMPLEMENTED();
- return gfx::SwapResult::SWAP_FAILED;
-}
-
-void NullTransportSurface::SendVSyncUpdateIfAvailable() {
- NOTREACHED();
-}
-
-bool NullTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
- // Override PassThroughImageTransportSurface default behavior which
- // sets the swap interval.
- return true;
-}
-
-} // namespace content
« no previous file with comments | « content/common/gpu/null_transport_surface.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698