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

Side by Side Diff: cc/blink/web_external_texture_layer_impl.cc

Issue 1739743003: Blink Compositor Animation: Erase old animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude histograms.xml Created 4 years, 9 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 | « cc/blink/web_content_layer_impl.cc ('k') | cc/blink/web_image_layer_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "cc/blink/web_external_texture_layer_impl.h" 5 #include "cc/blink/web_external_texture_layer_impl.h"
6 6
7 #include "cc/blink/web_external_bitmap_impl.h" 7 #include "cc/blink/web_external_bitmap_impl.h"
8 #include "cc/blink/web_layer_impl.h" 8 #include "cc/blink/web_layer_impl.h"
9 #include "cc/layers/layer_settings.h"
9 #include "cc/layers/texture_layer.h" 10 #include "cc/layers/texture_layer.h"
10 #include "cc/resources/single_release_callback.h" 11 #include "cc/resources/single_release_callback.h"
11 #include "cc/resources/texture_mailbox.h" 12 #include "cc/resources/texture_mailbox.h"
12 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" 13 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h"
13 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" 14 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h"
14 #include "third_party/WebKit/public/platform/WebFloatRect.h" 15 #include "third_party/WebKit/public/platform/WebFloatRect.h"
15 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 16 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
16 #include "third_party/WebKit/public/platform/WebSize.h" 17 #include "third_party/WebKit/public/platform/WebSize.h"
17 #include "third_party/khronos/GLES2/gl2.h" 18 #include "third_party/khronos/GLES2/gl2.h"
18 19
19 using cc::TextureLayer; 20 using cc::TextureLayer;
20 21
21 namespace cc_blink { 22 namespace cc_blink {
22 23
23 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl( 24 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(
24 blink::WebExternalTextureLayerClient* client) 25 blink::WebExternalTextureLayerClient* client)
25 : client_(client) { 26 : client_(client) {
26 cc::TextureLayerClient* cc_client = client_ ? this : nullptr; 27 cc::TextureLayerClient* cc_client = client_ ? this : nullptr;
27 scoped_refptr<TextureLayer> layer = 28 scoped_refptr<TextureLayer> layer =
28 TextureLayer::CreateForMailbox(WebLayerImpl::LayerSettings(), cc_client); 29 TextureLayer::CreateForMailbox(cc::LayerSettings(), cc_client);
29 layer->SetIsDrawable(true); 30 layer->SetIsDrawable(true);
30 layer_.reset(new WebLayerImpl(layer)); 31 layer_.reset(new WebLayerImpl(layer));
31 } 32 }
32 33
33 WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() { 34 WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() {
34 static_cast<TextureLayer*>(layer_->layer())->ClearClient(); 35 static_cast<TextureLayer*>(layer_->layer())->ClearClient();
35 } 36 }
36 37
37 blink::WebLayer* WebExternalTextureLayerImpl::layer() { 38 blink::WebLayer* WebExternalTextureLayerImpl::layer() {
38 return layer_.get(); 39 return layer_.get();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); 132 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name));
132 memcpy(available_mailbox.syncToken, sync_token.GetConstData(), 133 memcpy(available_mailbox.syncToken, sync_token.GetConstData(),
133 sizeof(sync_token)); 134 sizeof(sync_token));
134 available_mailbox.validSyncToken = sync_token.HasData(); 135 available_mailbox.validSyncToken = sync_token.HasData();
135 if (bitmap) 136 if (bitmap)
136 layer->free_bitmaps_.push_back(make_scoped_ptr(bitmap)); 137 layer->free_bitmaps_.push_back(make_scoped_ptr(bitmap));
137 layer->client_->mailboxReleased(available_mailbox, lost_resource); 138 layer->client_->mailboxReleased(available_mailbox, lost_resource);
138 } 139 }
139 140
140 } // namespace cc_blink 141 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_content_layer_impl.cc ('k') | cc/blink/web_image_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698